summaryrefslogtreecommitdiff
path: root/src/mongo/db/s/resharding/resharding_oplog_batch_applier_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/s/resharding/resharding_oplog_batch_applier_test.cpp')
-rw-r--r--src/mongo/db/s/resharding/resharding_oplog_batch_applier_test.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mongo/db/s/resharding/resharding_oplog_batch_applier_test.cpp b/src/mongo/db/s/resharding/resharding_oplog_batch_applier_test.cpp
index 600eb735962..6b99c919b82 100644
--- a/src/mongo/db/s/resharding/resharding_oplog_batch_applier_test.cpp
+++ b/src/mongo/db/s/resharding/resharding_oplog_batch_applier_test.cpp
@@ -190,7 +190,8 @@ public:
opCtx->setLogicalSessionId(std::move(lsid));
opCtx->setTxnNumber(txnNumber);
- MongoDOperationContextSession ocs(opCtx);
+ auto mongoDSessionCatalog = MongoDSessionCatalog::get(opCtx);
+ auto ocs = mongoDSessionCatalog->checkOutSession(opCtx);
auto txnParticipant = TransactionParticipant::get(opCtx);
txnParticipant.beginOrContinue(
opCtx, {txnNumber}, false /* autocommit */, true /* startTransaction */);
@@ -222,7 +223,8 @@ public:
opCtx->setLogicalSessionId(std::move(lsid));
opCtx->setTxnNumber(txnNumber);
- MongoDOperationContextSession ocs(opCtx);
+ auto mongoDSessionCatalog = MongoDSessionCatalog::get(opCtx);
+ auto ocs = mongoDSessionCatalog->checkOutSession(opCtx);
auto txnParticipant = TransactionParticipant::get(opCtx);
txnParticipant.beginOrContinue(
opCtx, {txnNumber}, false /* autocommit */, boost::none /* startTransaction */);