summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mongo/s/commands/cluster_create_indexes_cmd.cpp9
-rw-r--r--src/mongo/s/commands/cluster_drop_indexes_cmd.cpp4
2 files changed, 12 insertions, 1 deletions
diff --git a/src/mongo/s/commands/cluster_create_indexes_cmd.cpp b/src/mongo/s/commands/cluster_create_indexes_cmd.cpp
index 03fd5c28775..a7999507bbd 100644
--- a/src/mongo/s/commands/cluster_create_indexes_cmd.cpp
+++ b/src/mongo/s/commands/cluster_create_indexes_cmd.cpp
@@ -93,7 +93,14 @@ public:
BSONObj() /* query */,
BSONObj() /* collation */);
- return appendRawResponses(opCtx, &errmsg, &output, std::move(shardResponses)).responseOK;
+ const bool ok =
+ appendRawResponses(opCtx, &errmsg, &output, std::move(shardResponses)).responseOK;
+
+ if (ok) {
+ LOGV2(5706400, "Indexes created", "namespace"_attr = nss);
+ }
+
+ return ok;
}
} createIndexesCmd;
diff --git a/src/mongo/s/commands/cluster_drop_indexes_cmd.cpp b/src/mongo/s/commands/cluster_drop_indexes_cmd.cpp
index b26d3703db9..e0cb7c601ec 100644
--- a/src/mongo/s/commands/cluster_drop_indexes_cmd.cpp
+++ b/src/mongo/s/commands/cluster_drop_indexes_cmd.cpp
@@ -146,6 +146,10 @@ public:
uassertStatusOK(*aggregateResponse.firstStaleConfigError);
}
+ if (aggregateResponse.responseOK) {
+ LOGV2(5706401, "Indexes dropped", "namespace"_attr = nss);
+ }
+
return aggregateResponse.responseOK;
}