diff options
Diffstat (limited to 'src/mongo/db/dbcommands.cpp')
-rw-r--r-- | src/mongo/db/dbcommands.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/mongo/db/dbcommands.cpp b/src/mongo/db/dbcommands.cpp index 828bfa03215..3009e3d3699 100644 --- a/src/mongo/db/dbcommands.cpp +++ b/src/mongo/db/dbcommands.cpp @@ -1000,7 +1000,10 @@ namespace mongo { // TODO: OldClientContext legacy, needs to be removed CurOp::get(txn)->ensureStarted(); - CurOp::get(txn)->setNS(dbname); + { + stdx::lock_guard<Client> lk(*txn->getClient()); + CurOp::get(txn)->setNS_inlock(dbname); + } // We lock the entire database in S-mode in order to ensure that the contents will not // change for the stats snapshot. This might be unnecessary and if it becomes a @@ -1028,8 +1031,11 @@ namespace mongo { result.appendNumber("fileSize", 0); } else { - // TODO: OldClientContext legacy, needs to be removed - CurOp::get(txn)->enter(dbname.c_str(), db->getProfilingLevel()); + { + stdx::lock_guard<Client> lk(*txn->getClient()); + // TODO: OldClientContext legacy, needs to be removed + CurOp::get(txn)->enter_inlock(dbname.c_str(), db->getProfilingLevel()); + } db->getStats(txn, &result, scale); } @@ -1299,8 +1305,6 @@ namespace { LOG(2) << "command: " << request.getCommandName(); } - - if (command->maintenanceMode()) { mmSetter.reset(new MaintenanceModeSetter); } |