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/rpc/object_check.h | |
parent | f9c36696a25d3837f512421755952736236bbed0 (diff) | |
download | mongo-67500efdc1c677173c737ecde2b07b42015ae5fd.tar.gz |
SERVER-29350 Bump featureCompatibilityVersion to 3.6
Diffstat (limited to 'src/mongo/rpc/object_check.h')
-rw-r--r-- | src/mongo/rpc/object_check.h | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/src/mongo/rpc/object_check.h b/src/mongo/rpc/object_check.h index 7c7741ada62..2a6e485097c 100644 --- a/src/mongo/rpc/object_check.h +++ b/src/mongo/rpc/object_check.h @@ -45,19 +45,10 @@ class Status; template <> struct Validator<BSONObj> { inline static BSONVersion enabledBSONVersion() { - // If we're in the primary/master role accepting writes, but our feature compatibility - // version is 3.2, then we want to reject insertion of the decimal data type. Therefore, we - // perform BSON 1.0 validation. - if (serverGlobalParams.featureCompatibility.validateFeaturesAsMaster.load() && - serverGlobalParams.featureCompatibility.version.load() == - ServerGlobalParams::FeatureCompatibility::Version::k32) { - return BSONVersion::kV1_0; - } - - // Except for the special case above, we want to accept any BSON version which we know - // about. For instance, if we are a slave/secondary syncing from a primary/master and we are - // in 3.2 feature compatibility mode, we still want to be able to sync NumberDecimal data. - return BSONVersion::kV1_1; + // The enabled BSON version is always the latest BSON version if no new BSON types have been + // added during the release. Otherwise, the BSON version returned should be controlled + // through the featureCompatibilityVersion. + return BSONVersion::kLatest; } inline static Status validateLoad(const char* ptr, size_t length) { |