diff options
author | Gregory Wlodarek <gregory.wlodarek@mongodb.com> | 2020-03-20 12:27:23 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-03-20 18:32:00 +0000 |
commit | 7260060587d27731bbcb1f8a27e2d2d75b6cc287 (patch) | |
tree | 620f6f95fc7e3c16fdad48ef91ea83a4a2eb3514 /src/mongo/db/storage/bson_collection_catalog_entry.cpp | |
parent | 2259073c0d32e54749e5bf595fcd0e6b0b2eb8a4 (diff) | |
download | mongo-7260060587d27731bbcb1f8a27e2d2d75b6cc287.tar.gz |
SERVER-46781 Remove v4.4 FCV handling for collection and index catalog entry 'ns' field
Diffstat (limited to 'src/mongo/db/storage/bson_collection_catalog_entry.cpp')
-rw-r--r-- | src/mongo/db/storage/bson_collection_catalog_entry.cpp | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/src/mongo/db/storage/bson_collection_catalog_entry.cpp b/src/mongo/db/storage/bson_collection_catalog_entry.cpp index 1e016ff8f40..976c8123afc 100644 --- a/src/mongo/db/storage/bson_collection_catalog_entry.cpp +++ b/src/mongo/db/storage/bson_collection_catalog_entry.cpp @@ -140,32 +140,6 @@ bool BSONCollectionCatalogEntry::MetaData::eraseIndex(StringData name) { return true; } -void BSONCollectionCatalogEntry::MetaData::rename(StringData toNS) { - ns = toNS.toString(); - - // In FCV 4.4, the 'ns' field is not present. Only rename the 'ns' field for each index in - // FCV 4.2. - if (serverGlobalParams.featureCompatibility.isVersionInitialized() && - serverGlobalParams.featureCompatibility.getVersion() == - ServerGlobalParams::FeatureCompatibility::Version::kFullyUpgradedTo44) { - return; - } - - for (size_t i = 0; i < indexes.size(); i++) { - BSONObj spec = indexes[i].spec; - BSONObjBuilder b; - // Add the fields in the same order they were in the original specification. - for (auto&& elem : spec) { - if (elem.fieldNameStringData() == "ns") { - b.append("ns", toNS); - } else { - b.append(elem); - } - } - indexes[i].spec = b.obj(); - } -} - KVPrefix BSONCollectionCatalogEntry::MetaData::getMaxPrefix() const { // Use the collection prefix as the initial max value seen. Then compare it with each index // prefix. Note the oplog has no indexes so the vector of 'IndexMetaData' may be empty. |