-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Replication
-
None
-
Fully Compatible
-
ALL
-
v4.2
-
-
Execution Team 2019-08-12, Repl 2019-08-26, Repl 2019-09-09
-
7
Currently, we can see a 3 way deadlock between hybrid index builder, prepared txn and step down thread for the above repro. The problem is that when step down thread kills "createIndex" cmd thread. As part of index teardown step, on primary, MultiIndexBlock::cleanUpAfterBuild is called with RSTL held in IX mode which then tries to acquire X lock on user collection in an uninterruptible lock guard but gets blocked behind prepared transaction due to collection lock conflict. Since createIndex is holding RSTL in IX mode, it blocks step down thread. CommitTransaction cmd waiting to acquire RSTL lock in IX mode gets blocked behind the step down thread as the step down thread has enqueued RSTL lock in X mode.
- is related to
-
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-71191 Deadlock between index build setup, prepared transaction, and stepdown
- Closed
- related to
-
SERVER-42869 IndexBuildInterceptor rollback handler access _sideWritesCounter field after interceptor is destroyed
- Closed
-
SERVER-42824 do not lock RSTL for index build cleanup
- Closed
-
SERVER-44190 Adapt hybrid_index_build_on_state_transition.js to work with two phase index builds
- Closed
-
SERVER-42799 obtain timestamp for cleaning up index build without noop write
- Closed
-
SERVER-42800 skip size adjustments on temporary record stores for index builds
- Closed
-
SERVER-43837 remove RSTL unlocking logic from MultiIndexBlock::cleanUpAfterBuild()
- Closed