-
Type: Bug
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Catalog and Routing
-
ALL
-
0
The movePrimary coordinator currently sets the _movePrimaryInProgress flag (while holding database lock in MODE_X). The flag is kept to true during the duration of cloning. Create indexes checks that there is no concurrent movePrimary running. However, the check is insufficient because it is only performed during the phase where it will decide to implicitly create a collection. It will release the database lock after this and the index coordinator will reacquire the database lock later multiple times without checking _movePrimaryInProgress. This enables a scenario like this:
1. createIndex starts and passes the "no movePrimary in progess" test.
2. movePrimary sets the _movePrimaryInProgress flag and starts cloning.
3. createIndex proceeds to creating the new index.
- is related to
-
SERVER-75675 Ensure indexes are created in all shards
- Open
-
SERVER-90886 Add test workarounds for lack of movePrimary and createIndexes synchronization
- Closed
-
SERVER-73484 Serialize createIndexes and dropIndexes with movePrimary
- Closed
- related to
-
SERVER-91403 Fix Race Between movePrimary and count_indexed.js in Config Transition Suites
- Closed