summaryrefslogtreecommitdiff
path: root/src/mongo/db/catalog
diff options
context:
space:
mode:
authorAndy Schwerin <schwerin@mongodb.com>2015-05-27 19:36:59 -0400
committerAndy Schwerin <schwerin@mongodb.com>2015-06-05 14:21:56 -0400
commit51c2064d518140fbeae62f9d7ba29f1d69fb530f (patch)
treeb6d97eb91b4ac76279eb983234c6ec63ac44a8c6 /src/mongo/db/catalog
parent1cf11a282870c26ce7d963fb3a6c3329b39d90a2 (diff)
downloadmongo-51c2064d518140fbeae62f9d7ba29f1d69fb530f.tar.gz
SERVER-18277 Stronger locking rules for CurOp and OpDebug.
Diffstat (limited to 'src/mongo/db/catalog')
-rw-r--r--src/mongo/db/catalog/index_create.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mongo/db/catalog/index_create.cpp b/src/mongo/db/catalog/index_create.cpp
index 01dfb1037e4..67498ac19db 100644
--- a/src/mongo/db/catalog/index_create.cpp
+++ b/src/mongo/db/catalog/index_create.cpp
@@ -49,6 +49,7 @@
#include "mongo/db/query/internal_plans.h"
#include "mongo/db/repl/replication_coordinator_global.h"
#include "mongo/db/operation_context.h"
+#include "mongo/stdx/mutex.h"
#include "mongo/util/log.h"
#include "mongo/util/processinfo.h"
#include "mongo/util/progress_meter.h"
@@ -225,9 +226,11 @@ namespace mongo {
Status MultiIndexBlock::insertAllDocumentsInCollection(std::set<RecordId>* dupsOut) {
const char* curopMessage = _buildInBackground ? "Index Build (background)" : "Index Build";
- ProgressMeterHolder progress(*_txn->setMessage(curopMessage,
- curopMessage,
- _collection->numRecords(_txn)));
+ stdx::unique_lock<Client> lk(*_txn->getClient());
+ ProgressMeterHolder progress(*_txn->setMessage_inlock(curopMessage,
+ curopMessage,
+ _collection->numRecords(_txn)));
+ lk.unlock();
Timer t;