summaryrefslogtreecommitdiff
path: root/src/mongo/db/client.cpp
diff options
context:
space:
mode:
authorGeert Bosch <geert@mongodb.com>2014-09-30 09:56:21 -0400
committerGeert Bosch <geert@mongodb.com>2014-09-30 22:02:04 -0400
commitda599844c97ef6d290c03e073a9bafe41c1a914e (patch)
tree4b942aba73479a433b371db0dd713b3f0bd375f8 /src/mongo/db/client.cpp
parent068b1d23bb513bfc819de61514262a12cb75bcbb (diff)
downloadmongo-da599844c97ef6d290c03e073a9bafe41c1a914e.tar.gz
SERVER-14668: Replace uses of DBWrite lock with DBLock
This reverts commit 8e83e72512fcb8eb8f06987927766c0b77cea23e. This reinstates commit ae333bc94a7d89d3220dcae9579fcaf68aa2e290 and commit 962f959a09b63aa0482d7e0c9bad89363d1e1194, and fixes three cases where the wrong database name was locked.
Diffstat (limited to 'src/mongo/db/client.cpp')
-rw-r--r--src/mongo/db/client.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/client.cpp b/src/mongo/db/client.cpp
index 17901be98de..812e062ede9 100644
--- a/src/mongo/db/client.cpp
+++ b/src/mongo/db/client.cpp
@@ -238,7 +238,7 @@ namespace mongo {
Client::WriteContext::WriteContext(
OperationContext* opCtx, const std::string& ns, bool doVersion)
- : _lk(opCtx->lockState(), ns),
+ : _lk(opCtx->lockState(), nsToDatabaseSubstring(ns), newlm::MODE_X),
_wunit(opCtx),
_c(opCtx, ns, doVersion) {
}