diff options
author | Tess Avitabile <tess.avitabile@mongodb.com> | 2017-06-02 15:29:32 -0400 |
---|---|---|
committer | Tess Avitabile <tess.avitabile@mongodb.com> | 2017-06-09 15:05:04 -0400 |
commit | 67500efdc1c677173c737ecde2b07b42015ae5fd (patch) | |
tree | 4a735cf4c6561e28b76f65117d47231e9a677d04 /src/mongo/db/index/index_descriptor.cpp | |
parent | f9c36696a25d3837f512421755952736236bbed0 (diff) | |
download | mongo-67500efdc1c677173c737ecde2b07b42015ae5fd.tar.gz |
SERVER-29350 Bump featureCompatibilityVersion to 3.6
Diffstat (limited to 'src/mongo/db/index/index_descriptor.cpp')
-rw-r--r-- | src/mongo/db/index/index_descriptor.cpp | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/src/mongo/db/index/index_descriptor.cpp b/src/mongo/db/index/index_descriptor.cpp index 08696cd525e..5115a5edda6 100644 --- a/src/mongo/db/index/index_descriptor.cpp +++ b/src/mongo/db/index/index_descriptor.cpp @@ -116,21 +116,8 @@ Status IndexDescriptor::isIndexVersionAllowedForCreation( case IndexVersion::kV0: break; case IndexVersion::kV1: + case IndexVersion::kV2: return Status::OK(); - case IndexVersion::kV2: { - if (ServerGlobalParams::FeatureCompatibility::Version::k32 == - featureCompatibility.version.load() && - featureCompatibility.validateFeaturesAsMaster.load()) { - return {ErrorCodes::CannotCreateIndex, - str::stream() << "Invalid index specification " << indexSpec - << "; cannot create an index with v=" - << static_cast<int>(IndexVersion::kV2) - << " when the featureCompatibilityVersion is 3.2. See " - "http://dochub.mongodb.org/core/" - "3.4-feature-compatibility."}; - } - return Status::OK(); - } } return {ErrorCodes::CannotCreateIndex, str::stream() << "Invalid index specification " << indexSpec @@ -140,23 +127,6 @@ Status IndexDescriptor::isIndexVersionAllowedForCreation( IndexVersion IndexDescriptor::getDefaultIndexVersion( ServerGlobalParams::FeatureCompatibility::Version featureCompatibilityVersion) { - ServerGlobalParams::FeatureCompatibility featureCompatibility; - featureCompatibility.version.store(featureCompatibilityVersion); - // We always pass validateFeaturesAsMaster=true since this flag should not affect our - // determination of the default index version. - featureCompatibility.validateFeaturesAsMaster.store(true); - // We pass in an empty object for the index specification because it is only used within the - // error reason. - if (!IndexDescriptor::isIndexVersionAllowedForCreation( - IndexVersion::kV2, featureCompatibility, BSONObj()) - .isOK()) { - // When the featureCompatibilityVersion is 3.2, we use index version v=1 as the default - // index version. - return IndexVersion::kV1; - } - - // When the featureCompatibilityVersion is 3.4, we use index version v=2 as the default index - // version. return IndexVersion::kV2; } |