summaryrefslogtreecommitdiff
path: root/src/mongo/db/system_index.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/system_index.cpp')
-rw-r--r--src/mongo/db/system_index.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mongo/db/system_index.cpp b/src/mongo/db/system_index.cpp
index a36391c5bc7..66e07743167 100644
--- a/src/mongo/db/system_index.cpp
+++ b/src/mongo/db/system_index.cpp
@@ -109,9 +109,10 @@ void generateSystemIndexForExistingCollection(OperationContext* opCtx,
log() << "No authorization index detected on " << ns
<< " collection. Attempting to recover by creating an index with spec: " << indexSpec;
- auto indexBuildsCoord = IndexBuildsCoordinator::get(opCtx);
+ auto indexConstraints = IndexBuildsManager::IndexConstraints::kEnforce;
auto fromMigrate = false;
- indexBuildsCoord->createIndexes(opCtx, collectionUUID, {indexSpec}, fromMigrate);
+ IndexBuildsCoordinator::get(opCtx)->createIndexes(
+ opCtx, collectionUUID, {indexSpec}, indexConstraints, fromMigrate);
} catch (const DBException& e) {
severe() << "Failed to regenerate index for " << ns << ". Exception: " << e.what();
throw;