summaryrefslogtreecommitdiff
path: root/src/mongo/db/catalog/coll_mod.cpp
diff options
context:
space:
mode:
authorDenis Grebennicov <denis.grebennicov@mongodb.com>2022-07-15 14:27:54 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-07-15 15:36:46 +0000
commit6af105aa73b7e3ed88186a14a5e832434af65863 (patch)
tree9f4f8375af23d60aad7ae38a167c74b25b40b54b /src/mongo/db/catalog/coll_mod.cpp
parentbee3babbf2ef6b75667fe4e8b00219d84fdd1136 (diff)
downloadmongo-6af105aa73b7e3ed88186a14a5e832434af65863.tar.gz
SERVER-67386 Remove featureFlagChangeStreamPreAndPostImages
Diffstat (limited to 'src/mongo/db/catalog/coll_mod.cpp')
-rw-r--r--src/mongo/db/catalog/coll_mod.cpp31
1 files changed, 9 insertions, 22 deletions
diff --git a/src/mongo/db/catalog/coll_mod.cpp b/src/mongo/db/catalog/coll_mod.cpp
index 56011cd73e1..e731c39c0db 100644
--- a/src/mongo/db/catalog/coll_mod.cpp
+++ b/src/mongo/db/catalog/coll_mod.cpp
@@ -832,30 +832,17 @@ Status _collModInternal(OperationContext* opCtx,
const CollectionOptions& oldCollOptions = coll->getCollectionOptions();
- // TODO SERVER-58584: remove the feature flag.
- if (feature_flags::gFeatureFlagChangeStreamPreAndPostImages.isEnabled(
- serverGlobalParams.featureCompatibility)) {
- // If 'changeStreamPreAndPostImagesOptions' are enabled, 'recordPreImages' must be set
- // to false. If 'recordPreImages' is set to true, 'changeStreamPreAndPostImagesOptions'
- // must be disabled.
- if (cmrNew.changeStreamPreAndPostImagesOptions &&
- cmrNew.changeStreamPreAndPostImagesOptions->getEnabled()) {
- cmrNew.recordPreImages = false;
- }
-
- if (cmrNew.recordPreImages) {
- cmrNew.changeStreamPreAndPostImagesOptions =
- ChangeStreamPreAndPostImagesOptions(false);
- }
- } else {
- // If the FCV has changed while executing the command to the version, where the feature
- // flag is disabled, specifying changeStreamPreAndPostImagesOptions is not allowed.
- if (cmrNew.changeStreamPreAndPostImagesOptions) {
- return Status(ErrorCodes::InvalidOptions,
- "The 'changeStreamPreAndPostImages' is an unknown field.");
- }
+ // If 'changeStreamPreAndPostImagesOptions' are enabled, 'recordPreImages' must be set
+ // to false. If 'recordPreImages' is set to true, 'changeStreamPreAndPostImagesOptions'
+ // must be disabled.
+ if (cmrNew.changeStreamPreAndPostImagesOptions &&
+ cmrNew.changeStreamPreAndPostImagesOptions->getEnabled()) {
+ cmrNew.recordPreImages = false;
}
+ if (cmrNew.recordPreImages) {
+ cmrNew.changeStreamPreAndPostImagesOptions = ChangeStreamPreAndPostImagesOptions(false);
+ }
if (cmrNew.cappedSize || cmrNew.cappedMax) {
// If the current capped collection size exceeds the newly set limits, future document
// inserts will prompt document deletion.