summaryrefslogtreecommitdiff
path: root/src/mongo/db/index_builder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/index_builder.cpp')
-rw-r--r--src/mongo/db/index_builder.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/mongo/db/index_builder.cpp b/src/mongo/db/index_builder.cpp
index 6d205c45da9..e5939343265 100644
--- a/src/mongo/db/index_builder.cpp
+++ b/src/mongo/db/index_builder.cpp
@@ -87,7 +87,10 @@ namespace {
AuthorizationSession::get(txn.getClient())->grantInternalAuthorization();
- CurOp::get(txn)->setOp(dbInsert);
+ {
+ stdx::lock_guard<Client> lk(*txn.getClient());
+ CurOp::get(txn)->setOp_inlock(dbInsert);
+ }
NamespaceString ns(_index["ns"].String());
ScopedTransaction transaction(&txn, MODE_IX);
@@ -141,8 +144,11 @@ namespace {
}
}
- // Show which index we're building in the curop display.
- CurOp::get(txn)->setQuery(_index);
+ {
+ stdx::lock_guard<Client> lk(*txn->getClient());
+ // Show which index we're building in the curop display.
+ CurOp::get(txn)->setQuery_inlock(_index);
+ }
bool haveSetBgIndexStarting = false;
while (true) {