summaryrefslogtreecommitdiff
path: root/src/mongo/db/index_rebuilder.cpp
diff options
context:
space:
mode:
authorGeert Bosch <geert@mongodb.com>2014-09-25 14:41:01 -0400
committerGeert Bosch <geert@mongodb.com>2014-09-25 18:12:34 -0400
commit962f959a09b63aa0482d7e0c9bad89363d1e1194 (patch)
tree975a9ff722ec19992c15feb9d3fd1587278afc3c /src/mongo/db/index_rebuilder.cpp
parent77b00970997d13d0758c745e5a94fc79982d4401 (diff)
downloadmongo-962f959a09b63aa0482d7e0c9bad89363d1e1194.tar.gz
SERVER-14668: Replace uses of DBWrite lock with DBLock
Make the lock mode explicit as preparation to move some to intent locks, and use proper database name instead of full namespace string to lock databases.
Diffstat (limited to 'src/mongo/db/index_rebuilder.cpp')
-rw-r--r--src/mongo/db/index_rebuilder.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/index_rebuilder.cpp b/src/mongo/db/index_rebuilder.cpp
index cbde00dbf04..8dd345de946 100644
--- a/src/mongo/db/index_rebuilder.cpp
+++ b/src/mongo/db/index_rebuilder.cpp
@@ -64,7 +64,7 @@ namespace {
// This write lock is held throughout the index building process
// for this namespace.
- Lock::DBWrite lk(txn->lockState(), ns);
+ Lock::DBLock lk(txn->lockState(), nsToDatabaseSubstring(ns), newlm::MODE_X);
Client::Context ctx(txn, ns);
Collection* collection = ctx.db()->getCollection(txn, ns);