diff options
author | Nathan Louie <nathan.louie@10gen.com> | 2018-08-01 23:21:15 -0400 |
---|---|---|
committer | Nathan Louie <nathan.louie@10gen.com> | 2018-08-01 23:21:15 -0400 |
commit | 84cb23553ecca69fb2ec84dbd4aa13bb18f26b47 (patch) | |
tree | b464ce3eb2f2848bbd26803d126db11919d57dce /src/mongo/db/session.cpp | |
parent | 28ebaa2cd38d3d01b5bf5c34583e4ce37f03d373 (diff) | |
download | mongo-84cb23553ecca69fb2ec84dbd4aa13bb18f26b47.tar.gz |
SERVER-35433 Remove extra lock
Diffstat (limited to 'src/mongo/db/session.cpp')
-rw-r--r-- | src/mongo/db/session.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/db/session.cpp b/src/mongo/db/session.cpp index a3e83e413c2..9144f3cd6d2 100644 --- a/src/mongo/db/session.cpp +++ b/src/mongo/db/session.cpp @@ -941,7 +941,7 @@ void Session::_abortActiveTransaction(OperationContext* opCtx, // Clean up the transaction resources on opCtx even if the transaction on session has been // aborted. - _cleanUpTxnResourceOnOpCtx(lock, opCtx); + _cleanUpTxnResourceOnOpCtx(opCtx); } void Session::_abortTransactionOnSession(WithLock wl) { @@ -973,7 +973,7 @@ void Session::_abortTransactionOnSession(WithLock wl) { ServerTransactionsMetrics::get(getGlobalServiceContext())->decrementCurrentOpen(); } -void Session::_cleanUpTxnResourceOnOpCtx(WithLock wl, OperationContext* opCtx) { +void Session::_cleanUpTxnResourceOnOpCtx(OperationContext* opCtx) { // Reset the WUOW. We should be able to abort empty transactions that don't have WUOW. if (opCtx->getWriteUnitOfWork()) { opCtx->setWriteUnitOfWork(nullptr); @@ -1150,7 +1150,7 @@ void Session::_commitTransaction(stdx::unique_lock<stdx::mutex> lk, OperationCon // We must clear the recovery unit and locker so any post-transaction writes can run without // transactional settings such as a read timestamp. - _cleanUpTxnResourceOnOpCtx(lk, opCtx); + _cleanUpTxnResourceOnOpCtx(opCtx); } BSONObj Session::reportStashedState() const { |