diff options
author | Geert Bosch <geert@mongodb.com> | 2014-11-20 14:26:43 -0500 |
---|---|---|
committer | Geert Bosch <geert@mongodb.com> | 2014-11-21 13:18:53 -0500 |
commit | e7f6c56327afa51847a95d9d5bc6399209856c10 (patch) | |
tree | 93a6f8b98d13ff81bd21a2ffc9f312e4ff662123 /src/mongo/db/index_rebuilder.cpp | |
parent | e5644e2ca12a60df677cb8e8dfc70f19a9423b0a (diff) | |
download | mongo-e7f6c56327afa51847a95d9d5bc6399209856c10.tar.gz |
SERVER-16192: Add ScopedTransaction to automatically commitAndRestart()
Diffstat (limited to 'src/mongo/db/index_rebuilder.cpp')
-rw-r--r-- | src/mongo/db/index_rebuilder.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mongo/db/index_rebuilder.cpp b/src/mongo/db/index_rebuilder.cpp index e684bdc0baa..b23270e3afe 100644 --- a/src/mongo/db/index_rebuilder.cpp +++ b/src/mongo/db/index_rebuilder.cpp @@ -64,6 +64,7 @@ namespace { // This write lock is held throughout the index building process // for this namespace. + ScopedTransaction transaction(txn, MODE_IX); Lock::DBLock lk(txn->lockState(), nsToDatabaseSubstring(ns), MODE_X); Client::Context ctx(txn, ns); |