diff options
author | Geert Bosch <geert@mongodb.com> | 2014-09-25 14:41:01 -0400 |
---|---|---|
committer | Geert Bosch <geert@mongodb.com> | 2014-09-25 18:12:34 -0400 |
commit | 962f959a09b63aa0482d7e0c9bad89363d1e1194 (patch) | |
tree | 975a9ff722ec19992c15feb9d3fd1587278afc3c /src/mongo/dbtests/namespacetests.cpp | |
parent | 77b00970997d13d0758c745e5a94fc79982d4401 (diff) | |
download | mongo-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/dbtests/namespacetests.cpp')
-rw-r--r-- | src/mongo/dbtests/namespacetests.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/dbtests/namespacetests.cpp b/src/mongo/dbtests/namespacetests.cpp index 72a27859efa..aa6d7828629 100644 --- a/src/mongo/dbtests/namespacetests.cpp +++ b/src/mongo/dbtests/namespacetests.cpp @@ -524,7 +524,7 @@ namespace NamespaceTests { OperationContextImpl txn; - Lock::DBWrite lk(txn.lockState(), dbName); + Lock::DBLock lk(txn.lockState(), dbName, newlm::MODE_X); bool justCreated; Database* db = dbHolder().getOrCreate(&txn, dbName, justCreated); @@ -567,7 +567,7 @@ namespace NamespaceTests { OperationContextImpl txn; - Lock::DBWrite lk(txn.lockState(), dbName); + Lock::DBLock lk(txn.lockState(), dbName, newlm::MODE_X); bool justCreated; Database* db = dbHolder().getOrCreate(&txn, dbName, justCreated); |