-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 4.4.0, 5.0.0, 6.0.0, 7.0.0
-
Component/s: Sharding
-
None
-
Cluster Scalability
-
Fully Compatible
-
ALL
-
v7.0, v6.0, v5.0, v4.4
-
Cluster Scalability 2023-11-27, Cluster Scalability 2023-12-11, Cluster Scalability 2023-12-25
-
155
Consider a TransactionCoordinator that has sent the prepare command to the participants and then crashes. The new primary, on stepup, will resume the coordination. There are several points at which this can stall behind a read/write ticket acquisition. This is undesirable, both for performance and because it can cause deadlocks.
Ticket acquisitions occur at:
(1) When TransactionCoordinatorService::onStepUp calls replClientInfo.setLastOpToSystemLastOpTime, which takes the GlobalLock in MODE_IX.
(2) When TransactionCoordinatorService::onStepUp reads config.transaction_coordinators.
(3) When waiting for durable VectorClock. This sometimes results in a write (the first time after stepup, or upon topology changes).
(4) When (re-)persisting the participants list. Note that even though it had already been persisted, if the coordinator had not persisted the decision yet, on recovery we will persist again the participant list. As a separate improvement. we should also consider not doing this write again.
SERVER-60682 made persisting the decision skip ticket acquisition, but did not address these other situations that occur on recovery.
In addition to not skipping ticket acquisition, (1) and (3) do not skip FlowControl either.
- related to
-
SERVER-60682 TransactionCoordinator may block acquiring WiredTiger write ticket to persist its decision, prolonging transactions being in the prepared state
- Closed