diff options
author | Samyukta Lanka <samy.lanka@mongodb.com> | 2019-09-24 18:54:51 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2019-09-24 18:54:51 +0000 |
commit | 1781933c126d2aff697cdb42a8f84b8212db23ad (patch) | |
tree | b903149750710b82b3f8429c52b61cd4c4d02a74 /src/mongo/db/kill_sessions_local.cpp | |
parent | 4fc3e8d5910547e22d3c4afb22454ffaab343aa2 (diff) | |
download | mongo-1781933c126d2aff697cdb42a8f84b8212db23ad.tar.gz |
SERVER-40466 Unify checks for being in a multi-document transaction
(cherry picked from commit 77967c90b1a521108c052af235ce7de9742aa95e)
SERVER-42755 recover_prepared_txn_with_multikey_write.js should verify absence of prepare conflicts on catalog after restart.
(cherry picked from commit eaf81228328738b685532c7eb10f833362434061)
SERVER-42750 Set opCtx->inMultiDocumentTransaction() in transaction recovery.
(cherry picked from commit 16c17677704a4f979381d593106a0c356088fd30)
Diffstat (limited to 'src/mongo/db/kill_sessions_local.cpp')
-rw-r--r-- | src/mongo/db/kill_sessions_local.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/kill_sessions_local.cpp b/src/mongo/db/kill_sessions_local.cpp index 8c217cb7e25..c44234c7568 100644 --- a/src/mongo/db/kill_sessions_local.cpp +++ b/src/mongo/db/kill_sessions_local.cpp @@ -91,7 +91,7 @@ void killSessionsAbortUnpreparedTransactions(OperationContext* opCtx, matcher, [](const ObservableSession& session) { auto participant = TransactionParticipant::get(session); - return participant.inMultiDocumentTransaction() && !participant.transactionIsPrepared(); + return participant.transactionIsOpen() && !participant.transactionIsPrepared(); }, [](OperationContext* opCtx, const SessionToKill& session) { TransactionParticipant::get(session).abortTransactionIfNotPrepared(opCtx); @@ -138,7 +138,7 @@ void killSessionsLocalShutdownAllTransactions(OperationContext* opCtx) { killSessionsAction(opCtx, matcherAllSessions, [](const ObservableSession& session) { - return TransactionParticipant::get(session).inMultiDocumentTransaction(); + return TransactionParticipant::get(session).transactionIsOpen(); }, [](OperationContext* opCtx, const SessionToKill& session) { TransactionParticipant::get(session).shutdown(opCtx); |