diff options
Diffstat (limited to 'src/mongo/db/index/index_descriptor.cpp')
-rw-r--r-- | src/mongo/db/index/index_descriptor.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/mongo/db/index/index_descriptor.cpp b/src/mongo/db/index/index_descriptor.cpp index b276fb9b38c..3f4dbd088ed 100644 --- a/src/mongo/db/index/index_descriptor.cpp +++ b/src/mongo/db/index/index_descriptor.cpp @@ -107,7 +107,7 @@ constexpr StringData IndexDescriptor::kTextVersionFieldName; constexpr StringData IndexDescriptor::kUniqueFieldName; constexpr StringData IndexDescriptor::kHiddenFieldName; constexpr StringData IndexDescriptor::kWeightsFieldName; -constexpr StringData IndexDescriptor::kDisallowNewDuplicateKeysFieldName; +constexpr StringData IndexDescriptor::kPrepareUniqueFieldName; IndexDescriptor::IndexDescriptor(const std::string& accessMethodName, BSONObj infoObj) : _accessMethodName(accessMethodName), @@ -136,13 +136,12 @@ IndexDescriptor::IndexDescriptor(const std::string& accessMethodName, BSONObj in _collation = collationElement.Obj().getOwned(); } - if (BSONElement disallowNewDuplicateKeysElement = - _infoObj[kDisallowNewDuplicateKeysFieldName]) { + if (BSONElement prepareUniqueElement = _infoObj[kPrepareUniqueFieldName]) { uassert( ErrorCodes::InvalidOptions, - "Index does not support the 'disallowNewDuplicateKeys' field", + "Index does not support the 'prepareUnique' field", feature_flags::gCollModIndexUnique.isEnabled(serverGlobalParams.featureCompatibility)); - _disallowNewDuplicateKeys = disallowNewDuplicateKeysElement.trueValue(); + _prepareUnique = prepareUniqueElement.trueValue(); } } |