-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 4.2.0, 4.4.0, 5.0.0, 6.0.0
-
Component/s: Sharding
-
Sharding EMEA
-
Fully Compatible
-
ALL
-
-
Sharding EMEA 2023-02-20
Consider the following interleaving:
- 'Shard1' is the db-primary shard for database 'dbA'. There's an unsharded collection 'dbA.coll'.
- User runs movePrimary(dbA, to: 'Shard2') -> On 'shard1', the MovePrimary coordinator commits the operation and releases the critical section. But hangs before cleaning the "stale db data".
- User runs dropDatabase -> On 'shard2', which is now the db-primary shard.
- User now recreates 'dbA' on 'shard1' and does some writes on 'dbA.coll'.
- Now the MovePrimary coordinator of point (2) proceeds with cleaning "stale data". It will drop 'dbA.coll', so the writes that happened on point (4) are lost!
- depends on
-
SERVER-71201 Prevent operations on the recipient while the movePrimary is in progress
- Closed