summaryrefslogtreecommitdiff
path: root/src/mongo/db/storage/bson_collection_catalog_entry.cpp
diff options
context:
space:
mode:
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();
}