summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/create_command.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/commands/create_command.cpp')
-rw-r--r--src/mongo/db/commands/create_command.cpp18
1 files changed, 5 insertions, 13 deletions
diff --git a/src/mongo/db/commands/create_command.cpp b/src/mongo/db/commands/create_command.cpp
index 27a871ba489..6355709b39d 100644
--- a/src/mongo/db/commands/create_command.cpp
+++ b/src/mongo/db/commands/create_command.cpp
@@ -317,19 +317,11 @@ public:
const auto isChangeStreamPreAndPostImagesEnabled =
(cmd.getChangeStreamPreAndPostImages() &&
cmd.getChangeStreamPreAndPostImages()->getEnabled());
-
- if (feature_flags::gFeatureFlagChangeStreamPreAndPostImages.isEnabled(
- serverGlobalParams.featureCompatibility)) {
- const auto isRecordPreImagesEnabled = cmd.getRecordPreImages().get_value_or(false);
- uassert(ErrorCodes::InvalidOptions,
- "'recordPreImages' and 'changeStreamPreAndPostImages.enabled' can not be "
- "set to true simultaneously",
- !(isChangeStreamPreAndPostImagesEnabled && isRecordPreImagesEnabled));
- } else {
- uassert(ErrorCodes::InvalidOptions,
- "BSON field 'changeStreamPreAndPostImages' is an unknown field.",
- !cmd.getChangeStreamPreAndPostImages().has_value());
- }
+ const auto isRecordPreImagesEnabled = cmd.getRecordPreImages().get_value_or(false);
+ uassert(ErrorCodes::InvalidOptions,
+ "'recordPreImages' and 'changeStreamPreAndPostImages.enabled' can not be "
+ "set to true simultaneously",
+ !(isChangeStreamPreAndPostImagesEnabled && isRecordPreImagesEnabled));
OperationShardingState::ScopedAllowImplicitCollectionCreate_UNSAFE
unsafeCreateCollection(opCtx);