summaryrefslogtreecommitdiff
path: root/src/mongo/db/db_raii.cpp
diff options
context:
space:
mode:
authorMark Benvenuto <mark.benvenuto@mongodb.com>2016-05-17 11:17:29 -0400
committerMark Benvenuto <mark.benvenuto@mongodb.com>2016-05-17 11:17:29 -0400
commit42fa071dfbefaa47146cc33764ae078e25057aa9 (patch)
treefd820b4870c2d0a212c609bfc33e1f13da74d1b4 /src/mongo/db/db_raii.cpp
parent76de5323b88080f852ca4c2f42593502d26c5620 (diff)
downloadmongo-42fa071dfbefaa47146cc33764ae078e25057aa9.tar.gz
SERVER-24121 Client Spinlock should not be held while calling lock manager
Diffstat (limited to 'src/mongo/db/db_raii.cpp')
-rw-r--r--src/mongo/db/db_raii.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mongo/db/db_raii.cpp b/src/mongo/db/db_raii.cpp
index 8075c940b1a..e25c3d09ae0 100644
--- a/src/mongo/db/db_raii.cpp
+++ b/src/mongo/db/db_raii.cpp
@@ -141,8 +141,10 @@ void AutoGetCollectionForRead::_ensureMajorityCommittedSnapshotIsValid(const Nam
uassertStatusOK(_txn->recoveryUnit()->setReadFromMajorityCommittedSnapshot());
- stdx::lock_guard<Client> lk(*_txn->getClient());
- CurOp::get(_txn)->yielded();
+ {
+ stdx::lock_guard<Client> lk(*_txn->getClient());
+ CurOp::get(_txn)->yielded();
+ }
// Relock.
_autoColl.emplace(_txn, nss, MODE_IS);