summaryrefslogtreecommitdiff
path: root/src/mongo/db/storage/bson_collection_catalog_entry.cpp
diff options
context:
space:
mode:
authorPavi Vetriselvan <pavithra.vetriselvan@mongodb.com>2022-02-24 15:20:53 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-02-24 16:22:57 +0000
commita23d9da0518f79325b7dda04796dba0f856a08cd (patch)
treed31b1cd5ec01588521cb59860b0135d1f2e0612e /src/mongo/db/storage/bson_collection_catalog_entry.cpp
parent07ec8eb7a18490026a8a716f359a2d5c416e0006 (diff)
downloadmongo-a23d9da0518f79325b7dda04796dba0f856a08cd.tar.gz
SERVER-63664 Rename disallowNewDuplicateKeys option to prepareUnique
Diffstat (limited to 'src/mongo/db/storage/bson_collection_catalog_entry.cpp')
-rw-r--r--src/mongo/db/storage/bson_collection_catalog_entry.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/mongo/db/storage/bson_collection_catalog_entry.cpp b/src/mongo/db/storage/bson_collection_catalog_entry.cpp
index def3dc283d5..58cdc01fe39 100644
--- a/src/mongo/db/storage/bson_collection_catalog_entry.cpp
+++ b/src/mongo/db/storage/bson_collection_catalog_entry.cpp
@@ -146,20 +146,19 @@ void BSONCollectionCatalogEntry::IndexMetaData::updateUniqueSetting() {
spec = b.obj();
}
-void BSONCollectionCatalogEntry::IndexMetaData::updateDisallowNewDuplicateKeysSetting(
- bool disallowNewDuplicateKeys) {
- // If disallowNewDuplicateKeys == false, we remove this field from catalog rather than add a
+void BSONCollectionCatalogEntry::IndexMetaData::updatePrepareUniqueSetting(bool prepareUnique) {
+ // If prepareUnique == false, we remove this field from catalog rather than add a
// field with false.
BSONObjBuilder b;
for (BSONObjIterator bi(spec); bi.more();) {
BSONElement e = bi.next();
- if (e.fieldNameStringData() != "disallowNewDuplicateKeys") {
+ if (e.fieldNameStringData() != "prepareUnique") {
b.append(e);
}
}
- if (disallowNewDuplicateKeys) {
- b.append("disallowNewDuplicateKeys", disallowNewDuplicateKeys);
+ if (prepareUnique) {
+ b.append("prepareUnique", prepareUnique);
}
spec = b.obj();
}