summaryrefslogtreecommitdiff
path: root/src/mongo
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo')
-rw-r--r--src/mongo/db/index_builds_coordinator.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mongo/db/index_builds_coordinator.cpp b/src/mongo/db/index_builds_coordinator.cpp
index d7dc7bf58d2..7fd6f697764 100644
--- a/src/mongo/db/index_builds_coordinator.cpp
+++ b/src/mongo/db/index_builds_coordinator.cpp
@@ -695,6 +695,18 @@ void IndexBuildsCoordinator::_runIndexBuild(OperationContext* opCtx,
return it->second;
}();
+ // Add build UUID to lock manager diagnostic output.
+ auto locker = opCtx->lockState();
+ auto oldLockerDebugInfo = locker->getDebugInfo();
+ {
+ str::stream ss;
+ ss << "index build: " << replState->buildUUID;
+ if (!oldLockerDebugInfo.empty()) {
+ ss << "; " << oldLockerDebugInfo;
+ }
+ locker->setDebugInfo(ss);
+ }
+
auto status = [&]() {
try {
_runIndexBuildInner(opCtx, replState, indexBuildOptions);
@@ -704,6 +716,8 @@ void IndexBuildsCoordinator::_runIndexBuild(OperationContext* opCtx,
return Status::OK();
}();
+ locker->setDebugInfo(oldLockerDebugInfo);
+
// Ensure the index build is unregistered from the Coordinator and the Promise is set with
// the build's result so that callers are notified of the outcome.