diff options
author | Geert Bosch <geert@mongodb.com> | 2014-09-29 17:53:20 -0400 |
---|---|---|
committer | Geert Bosch <geert@mongodb.com> | 2014-09-29 17:54:36 -0400 |
commit | 8e83e72512fcb8eb8f06987927766c0b77cea23e (patch) | |
tree | 21167749db25a7124a528157f20d1f7a3be4beee /src/mongo/db/introspect.cpp | |
parent | 57af98451c500c5d8112cfc5e75917a0e561069f (diff) | |
download | mongo-8e83e72512fcb8eb8f06987927766c0b77cea23e.tar.gz |
BF-532: Revert "SERVER-14668: Replace uses of DBWrite lock with DBLock"
This reverts commit ae333bc94a7d89d3220dcae9579fcaf68aa2e290.
This reverts commit 962f959a09b63aa0482d7e0c9bad89363d1e1194.
Diffstat (limited to 'src/mongo/db/introspect.cpp')
-rw-r--r-- | src/mongo/db/introspect.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/mongo/db/introspect.cpp b/src/mongo/db/introspect.cpp index c84a1caafa0..c2f11b34e6d 100644 --- a/src/mongo/db/introspect.cpp +++ b/src/mongo/db/introspect.cpp @@ -135,11 +135,10 @@ namespace { BufBuilder profileBufBuilder(1024); try { - // NOTE: It's kind of weird that we lock the op's namespace, but have to for now - // since we're sometimes inside the lock already - const string dbname(nsToDatabase(currentOp.getNS())); - Lock::DBLock lk(txn->lockState(), dbname, newlm::MODE_X); - if (dbHolder().get(txn, dbname) != NULL) { + // NOTE: It's kind of weird that we lock the op's namespace, but have to for now since + // we're sometimes inside the lock already + Lock::DBWrite lk(txn->lockState(), currentOp.getNS() ); + if (dbHolder().get(txn, nsToDatabase(currentOp.getNS())) != NULL) { // We are ok with the profiling happening in a different WUOW from the actual op. WriteUnitOfWork wunit(txn); Client::Context cx(txn, currentOp.getNS(), false); |