summaryrefslogtreecommitdiff
path: root/src/mongo/db/s/session_catalog_migration_destination.cpp
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2018-11-29 09:19:26 -0500
committerKaloian Manassiev <kaloian.manassiev@mongodb.com>2018-12-06 07:54:00 -0500
commite5967d7b430fb8eb8a2e56ab9bdaa946e7bbdfa8 (patch)
tree204072ee4aae802cb603f14067d4d7a774c0c535 /src/mongo/db/s/session_catalog_migration_destination.cpp
parent55ade18c488a08d160a3341799b9ea276f262d08 (diff)
downloadmongo-e5967d7b430fb8eb8a2e56ab9bdaa946e7bbdfa8.tar.gz
SERVER-37923 Make chunk migration check-out the session
With this change there are no callers which modify the session state without having checked it out first.
Diffstat (limited to 'src/mongo/db/s/session_catalog_migration_destination.cpp')
-rw-r--r--src/mongo/db/s/session_catalog_migration_destination.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/s/session_catalog_migration_destination.cpp b/src/mongo/db/s/session_catalog_migration_destination.cpp
index b7d04fcbfcb..4d2a9c32e97 100644
--- a/src/mongo/db/s/session_catalog_migration_destination.cpp
+++ b/src/mongo/db/s/session_catalog_migration_destination.cpp
@@ -247,7 +247,7 @@ ProcessOplogResult processSessionOplog(OperationContext* opCtx,
const auto stmtId = *oplogEntry.getStatementId();
- auto scopedSession = SessionCatalog::get(opCtx)->getOrCreateSession(opCtx, result.sessionId);
+ auto scopedSession = SessionCatalog::get(opCtx)->checkOutSession(opCtx, result.sessionId);
auto const txnParticipant =
TransactionParticipant::getFromNonCheckedOutSession(scopedSession.get());
txnParticipant->refreshFromStorageIfNeeded(opCtx);