-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Replication
-
None
-
Fully Compatible
-
ALL
-
v4.2
-
Repl 2019-07-01, Repl 2019-07-15, Repl 2019-07-29
-
17
In TxnParticipant::TxnResources::release(OperationContext*), it is possible for either restoring _locker->restoreWriteUnitOfWorkAndLock() or _locker->reacquireTicket(opCtx) to fail. If _locker->reacquireTicket() fails, the locker may be in an inconsistent state (holding locks but not the ticket). Further, because of the swap() we do in TransactionParticipant::Participant::_releaseTransactionResourcesToOpCtx, if either one happens we lose the TxnResources object entirely. If the transaction was prepared, it is now in a prepared state without a stash, which result in a crash next time it is used. If it was not, it's now effectively aborted though not marked as so.
For prepared transactions we need to ensure a failed release() leaves the transaction as-is. This will work for other operations as well, but usually we abort in the case of transaction errors so we may want to force an abort in that case as well.
- is related to
-
SERVER-41881 Stashing the lock resources for prepared transactions by state transitions (step up/ step down) should not preserve the maxLockTimeout of the previous node's state.
- Closed
-
SERVER-41883 UnConditional step down should not set a maxLockTimeout while unstashing the lock resources as a part of yieldLocksForPreparedTransactions().
- Closed
-
SERVER-41976 Server should not attach TransientTransactionError label to prepared transaction commands (commit) when the command fails with LockTimeout.
- Closed
-
SERVER-41980 Non-transactional commands can deadlock with prepared transactions when the tickets are exhausted by the non-transactional write commands.
- Closed
-
SERVER-42388 Release the transaction lock resources and abort storage transaction for unprepared transactions on failure to unstash the transaction resources to opCtx.
- Closed
- related to
-
SERVER-42381 A failed unstashTransactionResources must leave transaction in stashed or aborted state
- Closed