IndexBuildsCoordinatorMongod::_waitForNextIndexBuildAction() holds RSTL only for the while loop scope to perform primary check. Because of that, the primary check is no longer valid after this point. This can lead stepped down node(secondary) trying to commit or abort without getting commit/abortIndex oplog entry for 2 phase index builds. In turn, it results in this invariant failure.
- is depended on by
-
SERVER-47605 Single-phase index builds should only check constraint violations upon completion
- Closed
- is duplicated by
-
SERVER-44722 3 way deadlock can happen between hybrid index build, prepared transactions and stepdown thread on primary that runs index build via coordinator.
- Closed
-
SERVER-46704 Two phase index build can violate locking ordering and can lead to deadlocks.
- Closed
-
SERVER-44045 allow secondary index builds to start without unlocking the RSTL
- Closed
- related to
-
SERVER-69677 Add warning to index build unexpected error code invariant and only enable in debug builds
- Closed