summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mongo/db/index_builder.cpp4
-rw-r--r--src/mongo/db/instance.cpp1
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 )