summaryrefslogtreecommitdiff
path: root/src/mongo/db/transaction_participant.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/transaction_participant.cpp')
-rw-r--r--src/mongo/db/transaction_participant.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/transaction_participant.cpp b/src/mongo/db/transaction_participant.cpp
index 01d378e2d88..53f7350d77b 100644
--- a/src/mongo/db/transaction_participant.cpp
+++ b/src/mongo/db/transaction_participant.cpp
@@ -669,7 +669,7 @@ TransactionParticipant::TxnResources::TxnResources(WithLock wl,
_ruState = opCtx->getWriteUnitOfWork()->release();
opCtx->setWriteUnitOfWork(nullptr);
- _locker = opCtx->swapLockState(std::make_unique<LockerImpl>());
+ _locker = opCtx->swapLockState(std::make_unique<LockerImpl>(), wl);
// Inherit the locking setting from the original one.
opCtx->lockState()->setShouldConflictWithSecondaryBatchApplication(
_locker->shouldConflictWithSecondaryBatchApplication());
@@ -762,7 +762,7 @@ void TransactionParticipant::TxnResources::release(OperationContext* opCtx) {
// We intentionally do not capture the return value of swapLockState(), which is just an empty
// locker. At the end of the operation, if the transaction is not complete, we will stash the
// operation context's locker and replace it with a new empty locker.
- opCtx->swapLockState(std::move(_locker));
+ opCtx->swapLockState(std::move(_locker), lk);
opCtx->lockState()->updateThreadIdToCurrentThread();
auto oldState = opCtx->setRecoveryUnit(std::move(_recoveryUnit),