summaryrefslogtreecommitdiff
path: root/src/mongo/db/collection_index_builds_tracker.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/collection_index_builds_tracker.cpp')
-rw-r--r--src/mongo/db/collection_index_builds_tracker.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mongo/db/collection_index_builds_tracker.cpp b/src/mongo/db/collection_index_builds_tracker.cpp
index 58b3fef7b1b..9ef10722691 100644
--- a/src/mongo/db/collection_index_builds_tracker.cpp
+++ b/src/mongo/db/collection_index_builds_tracker.cpp
@@ -49,7 +49,10 @@ void CollectionIndexBuildsTracker::addIndexBuild(
invariant(replIndexBuildState->indexNames.size());
for (auto& indexName : replIndexBuildState->indexNames) {
// Ensure that a new entry is added.
- invariant(_buildStateByIndexName.emplace(indexName, replIndexBuildState).second);
+ invariant(_buildStateByIndexName.emplace(indexName, replIndexBuildState).second,
+ str::stream() << "index build state for " << indexName
+ << " already exists. Collection: "
+ << replIndexBuildState->collectionUUID);
}
}