diff options
Diffstat (limited to 'src/mongo/db/storage')
-rw-r--r-- | src/mongo/db/storage/bson_collection_catalog_entry.cpp | 11 | ||||
-rw-r--r-- | src/mongo/db/storage/bson_collection_catalog_entry.h | 2 |
2 files changed, 6 insertions, 7 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(); } diff --git a/src/mongo/db/storage/bson_collection_catalog_entry.h b/src/mongo/db/storage/bson_collection_catalog_entry.h index c85bc6755d0..18bca894a71 100644 --- a/src/mongo/db/storage/bson_collection_catalog_entry.h +++ b/src/mongo/db/storage/bson_collection_catalog_entry.h @@ -100,7 +100,7 @@ public: void updateUniqueSetting(); - void updateDisallowNewDuplicateKeysSetting(bool disallowNewDuplicateKeys); + void updatePrepareUniqueSetting(bool prepareUnique); StringData nameStringData() const { return spec["name"].valueStringDataSafe(); |