diff options
author | Jon Streets <jonathan.streets@mongodb.com> | 2021-05-19 20:10:31 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-07-23 15:49:23 +0000 |
commit | 05a0f8e98b633a6e6c26c10576a1044f9da161b5 (patch) | |
tree | 3952e670c0e71987b5173eb02e1a279f60bf7b6e /src/mongo/db/update | |
parent | 785c2ed58a5e98335faf37b14cef0bbce5832ee2 (diff) | |
download | mongo-05a0f8e98b633a6e6c26c10576a1044f9da161b5.tar.gz |
SERVER-56366 Update FCV constants to recognize 5.1 as latest
Diffstat (limited to 'src/mongo/db/update')
-rw-r--r-- | src/mongo/db/update/pipeline_executor.cpp | 2 | ||||
-rw-r--r-- | src/mongo/db/update/storage_validation.cpp | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/db/update/pipeline_executor.cpp b/src/mongo/db/update/pipeline_executor.cpp index 3bd5ec062fe..c2e77fb1e90 100644 --- a/src/mongo/db/update/pipeline_executor.cpp +++ b/src/mongo/db/update/pipeline_executor.cpp @@ -104,7 +104,7 @@ UpdateExecutor::ApplyResult PipelineExecutor::applyUpdate(ApplyParams applyParam bool allowTopLevelDollarPrefixedFields = serverGlobalParams.featureCompatibility.isVersionInitialized() && serverGlobalParams.featureCompatibility.isGreaterThanOrEqualTo( - FeatureCompatibilityParams::Version::kVersion50); + FeatureCompatibilityParams::Version::kFullyDowngradedTo50); auto ret = ObjectReplaceExecutor::applyReplacementUpdate( applyParams, transformedDoc, transformedDocHasIdField, allowTopLevelDollarPrefixedFields); diff --git a/src/mongo/db/update/storage_validation.cpp b/src/mongo/db/update/storage_validation.cpp index 12f7559fefd..444637470f3 100644 --- a/src/mongo/db/update/storage_validation.cpp +++ b/src/mongo/db/update/storage_validation.cpp @@ -115,7 +115,7 @@ void validateDollarPrefixElement(mutablebson::ConstElement elem) { const auto replaceWithHint = serverGlobalParams.featureCompatibility.isVersionInitialized() && serverGlobalParams.featureCompatibility.isGreaterThanOrEqualTo( - FeatureCompatibilityParams::Version::kVersion50) + FeatureCompatibilityParams::Version::kFullyDowngradedTo50) ? "' is not allowed in the context of an update's replacement document. Consider using " "an aggregation pipeline with $replaceWith." : "' is not valid for storage."; @@ -140,7 +140,7 @@ Status storageValidIdField(const mongo::BSONElement& element) { if (!status.isOK() && status.code() == ErrorCodes::DollarPrefixedFieldName && serverGlobalParams.featureCompatibility.isVersionInitialized() && serverGlobalParams.featureCompatibility.isGreaterThanOrEqualTo( - FeatureCompatibilityParams::Version::kVersion50)) { + FeatureCompatibilityParams::Version::kFullyDowngradedTo50)) { return Status(status.code(), str::stream() << "_id fields may not contain '$'-prefixed fields: " << status.reason()); @@ -203,7 +203,7 @@ void storageValid(mutablebson::ConstElement elem, const bool dotsAndDollarsFeatureEnabled = serverGlobalParams.featureCompatibility.isVersionInitialized() && serverGlobalParams.featureCompatibility.isGreaterThanOrEqualTo( - FeatureCompatibilityParams::Version::kVersion50); + FeatureCompatibilityParams::Version::kFullyDowngradedTo50); const bool checkFields = !dotsAndDollarsFeatureEnabled || checkTopLevelFields; auto fieldName = elem.getFieldName(); |