diff options
Diffstat (limited to 'src/mongo/db/transaction_participant.cpp')
-rw-r--r-- | src/mongo/db/transaction_participant.cpp | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/src/mongo/db/transaction_participant.cpp b/src/mongo/db/transaction_participant.cpp index 96512354255..70888e12126 100644 --- a/src/mongo/db/transaction_participant.cpp +++ b/src/mongo/db/transaction_participant.cpp @@ -1174,20 +1174,6 @@ void TransactionParticipant::Participant::commitUnpreparedTransaction(OperationC auto opObserver = opCtx->getServiceContext()->getOpObserver(); invariant(opObserver); - auto abortGuard = makeGuard([&] { - if (gUseMultipleOplogEntryFormatForTransactions && - serverGlobalParams.featureCompatibility.getVersion() == - ServerGlobalParams::FeatureCompatibility::Version::kFullyUpgradedTo42) { - // We should already be holding the RSTL if we have performed a read or write - // as part of this unprepared transaction. - invariant(opCtx->lockState()->isRSTLLocked()); - opCtx->runWithoutInterruptionExceptAtGlobalShutdown([&] { - _abortActiveTransaction( - opCtx, TransactionState::kInProgress, true /* writeOplog */); - }); - } - }); - opObserver->onUnpreparedTransactionCommit(opCtx, txnOps); // Read-only transactions with all read concerns must wait for any data they read to be majority @@ -1210,8 +1196,6 @@ void TransactionParticipant::Participant::commitUnpreparedTransaction(OperationC o(lk).txnState.transitionTo(TransactionState::kCommittingWithoutPrepare); } - abortGuard.dismiss(); - try { // Once entering "committing without prepare" we cannot throw an exception. UninterruptibleLockGuard noInterrupt(opCtx->lockState()); |