-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: 5.3.0, 6.0.0-rc0
-
Component/s: Sharding
-
None
-
ALL
-
-
Sharding EMEA 2022-05-30
-
153
There exists a possible deadlock on stepup involving a particular interleaving of a transaction starting and becoming prepared (ii) and a stepdown during a chunk migration.
Consider the following interleaving:
1.A chunk migration recipient that has exited its critical section but not yet removed its recovery document.
2. As soon as the critical section was released, a new prepared transaction could have started and reached the prepare state.
3. The recipient primary down steps down. because the migration recipient recovery document still exists, the upcoming primary will need to recover it. Then, still under drain mode, this involves reacquiring the critical section, which requires taking the collection lock in MODE_S.
However, because there was a prepared transaction (whose locks are reacquired earlier in the stepup sequence), the migration recovery won't be able to acquire the lock and will deadlock on stepup.
- is related to
-
SERVER-81116 Prevent deadlock during stepup
- Open
- related to
-
SERVER-65947 MigrationDestinationManager must recover if an error occurs during release of the critical section
- Closed