diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2018-12-06 07:58:44 -0500 |
---|---|---|
committer | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2018-12-06 08:06:48 -0500 |
commit | e7302a09ff2b6a1906ccff76121f6eb7f8773c37 (patch) | |
tree | b0726f27f1bd7d7d785f5815dea8933b528a3bc1 /src/mongo/db/kill_sessions_local.cpp | |
parent | e5967d7b430fb8eb8a2e56ab9bdaa946e7bbdfa8 (diff) | |
download | mongo-e7302a09ff2b6a1906ccff76121f6eb7f8773c37.tar.gz |
SERVER-37923 Rename TransactionParticipant::getFromNonCheckedOutSession to be just get(Session*)
Diffstat (limited to 'src/mongo/db/kill_sessions_local.cpp')
-rw-r--r-- | src/mongo/db/kill_sessions_local.cpp | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/src/mongo/db/kill_sessions_local.cpp b/src/mongo/db/kill_sessions_local.cpp index 2ea7b2b6f1d..02874d0b63f 100644 --- a/src/mongo/db/kill_sessions_local.cpp +++ b/src/mongo/db/kill_sessions_local.cpp @@ -86,14 +86,12 @@ void killSessionsAction(OperationContext* opCtx, void killSessionsLocalKillTransactions(OperationContext* opCtx, const SessionKiller::Matcher& matcher, ErrorCodes::Error reason) { - killSessionsAction(opCtx, - matcher, - [](Session*) { return true; }, - [](Session* session) { - TransactionParticipant::getFromNonCheckedOutSession(session) - ->abortArbitraryTransaction(); - }, - reason); + killSessionsAction( + opCtx, + matcher, + [](Session*) { return true; }, + [](Session* session) { TransactionParticipant::get(session)->abortArbitraryTransaction(); }, + reason); } SessionKiller::Result killSessionsLocal(OperationContext* opCtx, @@ -115,14 +113,12 @@ void killAllExpiredTransactions(OperationContext* opCtx) { opCtx, matcherAllSessions, [](Session* session) { - const auto txnParticipant = - TransactionParticipant::getFromNonCheckedOutSession(session); + const auto txnParticipant = TransactionParticipant::get(session); return txnParticipant->expired(); }, [](Session* session) { - const auto txnParticipant = - TransactionParticipant::getFromNonCheckedOutSession(session); + const auto txnParticipant = TransactionParticipant::get(session); LOG(0) << "Aborting transaction with txnNumber " << txnParticipant->getActiveTxnNumber() @@ -153,9 +149,7 @@ void killSessionsLocalShutdownAllTransactions(OperationContext* opCtx) { killSessionsAction(opCtx, matcherAllSessions, [](Session*) { return true; }, - [](Session* session) { - TransactionParticipant::getFromNonCheckedOutSession(session)->shutdown(); - }, + [](Session* session) { TransactionParticipant::get(session)->shutdown(); }, ErrorCodes::InterruptedAtShutdown); } |