-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Replication
-
None
-
Fully Compatible
-
ALL
-
Repl 2019-06-03
-
20
SERVER-40269 introduced a check in the execution of the commitTransaction command that would cause the server to usassert if the commit was for a prepare that has not yet been majority committed. For that purpose, the command needs to acquire the replication coordinator mutex while it has its session checked out, so it needs to be interruptible. Otherwise, it can deadlock with stepdown, which holds the replication coordinator mutex while trying to check out sessions to make prepared transactions yield their locks.
We can avoid this deadlock if we move the check into TransactionParticipant::commitPreparedTransaction, soon after the RSTL lock acquisition. Stepdown would already be holding the RSTL, and we would be interruptible while waiting to acquire it.
- is related to
-
SERVER-41355 Step down should call yieldLocksForPreparedTransactions w/o holding repl mutex lock (ReplicationCoordinatorImpl::_mutex).
- Closed