diff options
Diffstat (limited to 'src/mongo/db/catalog/index_create.cpp')
-rw-r--r-- | src/mongo/db/catalog/index_create.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/mongo/db/catalog/index_create.cpp b/src/mongo/db/catalog/index_create.cpp index d71d26b13b7..823dacff550 100644 --- a/src/mongo/db/catalog/index_create.cpp +++ b/src/mongo/db/catalog/index_create.cpp @@ -215,11 +215,9 @@ StatusWith<std::vector<BSONObj>> MultiIndexBlock::init(const std::vector<BSONObj const IndexDescriptor* descriptor = index.block->getEntry()->descriptor(); - IndexCatalog::prepareInsertDeleteOptions(_txn, descriptor, &index.options); - index.options.dupsAllowed = index.options.dupsAllowed || _ignoreUnique; - if (_ignoreUnique) { - index.options.getKeysMode = IndexAccessMethod::GetKeysMode::kRelaxConstraints; - } + index.options.logIfError = false; // logging happens elsewhere if needed. + index.options.dupsAllowed = !descriptor->unique() || _ignoreUnique || + repl::getGlobalReplicationCoordinator()->shouldIgnoreUniqueIndex(descriptor); log() << "build index on: " << ns << " properties: " << descriptor->toString(); if (index.bulk) |