summary: shouldBuildIndexesOnEmptyCollectionSinglePhased() is racy and can make index builds to hang forever and can block DDL operations.
The empty collection check is racy.
[Acquires collection lock in X mode.
Register index build.
Performs collection empty check by opening cursor and see if record exists or not.
Releases the collection lock.]
======>>>>Documents can get deleted here
[Index build thread pool scheduling
Collection scan phase
Drain phase
Commit phase]
- is duplicated by
-
SERVER-46656 Secondary and primary can disagree on index build method
- Closed
- is related to
-
SERVER-46814 Invariant on "Commit quorum is missing for index build"
- Closed
-
SERVER-21700 Do not relax constraints during steady state replication
- Closed
- related to
-
SERVER-45201 Implicit collection creation from createIndexes can stall replication on secondaries by circumventing thread pool on primary
- Closed