summaryrefslogtreecommitdiff
path: root/src/mongo/db/kill_sessions_local.cpp
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2018-12-06 07:58:44 -0500
committerKaloian Manassiev <kaloian.manassiev@mongodb.com>2018-12-06 08:06:48 -0500
commite7302a09ff2b6a1906ccff76121f6eb7f8773c37 (patch)
treeb0726f27f1bd7d7d785f5815dea8933b528a3bc1 /src/mongo/db/kill_sessions_local.cpp
parente5967d7b430fb8eb8a2e56ab9bdaa946e7bbdfa8 (diff)
downloadmongo-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.cpp24
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);
}