-
Type: Improvement
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Storage
-
None
-
Execution Team 2019-11-04, Execution Team 2020-05-04
-
0
One of the planned improvements related to two phase index builds require secondary nodes in a replica set to be able to continue to run index builds on stepping up to primary. This requires the new primary node to hold the RSTL in order to write the commitIndexBuild or abortIndexBuild entries to the oplog.
Index builds on secondary nodes current unlock the RSTL before starting (specifically, the scanning, draining, and completion phases). This logic was introduced in SERVER-41462 to avoid deadlocks with prepared transactions on replica set transitions such as step up/down.
In SERVER-42824, we started unlocking the RSTL on both primary and secondary nodes before cleaning up a failed index build. This logic was recently moved into the IndexBuildsCoordinator in SERVER-43415.
To support two phase index builds, it would be desirable to remove the RSTL unlocking logic.
- duplicates
-
SERVER-46989 Index builds should hold RSTL to prevent replication state changes after deciding to commit or abort
- Closed
- is related to
-
SERVER-43415 indexbg_killop_primary.js crashes when two phase index builds are enabled
- Closed
-
SERVER-46704 Two phase index build can violate locking ordering and can lead to deadlocks.
- Closed
-
SERVER-39451 Add recover to a stable timestamp logic for startIndexBuild, abortIndexBuild, commitIndexBuild
- Closed
-
SERVER-39452 Add rollback via refetch logic for startIndexBuild, abortIndexBuild, commitIndexBuild
- Closed
-
SERVER-41462 do not lock RSTL for uninterruptible index lock operations
- Closed
-
SERVER-42824 do not lock RSTL for index build cleanup
- Closed
-
SERVER-43837 remove RSTL unlocking logic from MultiIndexBlock::cleanUpAfterBuild()
- Closed
- related to
-
SERVER-44507 Hybrid index build is able to commit (acquire stronger mode locks) for a collection that contains prepared documents. (4.2 only)
- Closed
-
SERVER-41033 set ignore_prepare=true throughout any part of index building that happens in runWithoutInterruption
- Closed