diff options
author | Eric Milkie <milkie@10gen.com> | 2014-03-21 14:00:34 -0400 |
---|---|---|
committer | Eric Milkie <milkie@10gen.com> | 2014-03-21 14:01:08 -0400 |
commit | d44539de6758237c8b6eaa57a59988fa5b6ef9ac (patch) | |
tree | 0e426677ec2fdeee85c7579bab38c3ac8125584c | |
parent | d2716598fc73a359f88f10d3c691979d727f287b (diff) | |
download | mongo-d44539de6758237c8b6eaa57a59988fa5b6ef9ac.tar.gz |
SERVER-13053 fix curop query field for index builds outside of createIndexes commandr2.6.0-rc2
(cherry picked from commit 6849110b99b4fc4e9fd162ac897e1a8e5180e72e)
-rw-r--r-- | src/mongo/db/index_builder.cpp | 4 | ||||
-rw-r--r-- | src/mongo/db/instance.cpp | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/db/index_builder.cpp b/src/mongo/db/index_builder.cpp index cb4da4b988f..af13ee8acd9 100644 --- a/src/mongo/db/index_builder.cpp +++ b/src/mongo/db/index_builder.cpp @@ -75,6 +75,10 @@ namespace mongo { c = db->getOrCreateCollection( ns ); verify(c); } + + // Show which index we're building in the curop display. + context.getClient()->curop()->setQuery(_index); + Status status = c->getIndexCatalog()->createIndex( _index, true, IndexCatalog::SHUTDOWN_LEAVE_DIRTY ); diff --git a/src/mongo/db/instance.cpp b/src/mongo/db/instance.cpp index d8caf40827d..58cf5fa55e0 100644 --- a/src/mongo/db/instance.cpp +++ b/src/mongo/db/instance.cpp @@ -819,6 +819,7 @@ namespace mongo { // operation might not support interrupts. bool mayInterrupt = cc().curop()->parent() == NULL; + cc().curop()->setQuery(js); Status status = collection->getIndexCatalog()->createIndex( js, mayInterrupt ); if ( status.code() == ErrorCodes::IndexAlreadyExists ) |