diff --git a/jstests/concurrency/fsm_workloads/random_moveChunk_multi_update_delete_change_streams.js b/jstests/concurrency/fsm_workloads/random_moveChunk_multi_update_delete_change_streams.js index 7358f72f901..07426c802eb 100644 --- a/jstests/concurrency/fsm_workloads/random_moveChunk_multi_update_delete_change_streams.js +++ b/jstests/concurrency/fsm_workloads/random_moveChunk_multi_update_delete_change_streams.js @@ -8,9 +8,7 @@ * @tags: [ * requires_sharding, * assumes_balancer_off, - * uses_change_streams, - * requires_fcv_53, - * featureFlagNoChangeStreamEventsDueToOrphans + * uses_change_streams * ]; */ load('jstests/concurrency/fsm_libs/extend_workload.js'); diff --git a/jstests/sharding/change_stream_no_orphans.js b/jstests/sharding/change_stream_no_orphans.js index 4ee6fb4f562..f616f91c931 100644 --- a/jstests/sharding/change_stream_no_orphans.js +++ b/jstests/sharding/change_stream_no_orphans.js @@ -7,11 +7,6 @@ * - Test case 2: Broadcasted operations (from router) on orphaned documents * - Test case 3: Transaction from router updating both orphaned and owned documents * - Test case 4: Transaction to shard updating both orphaned and owned documents - * - * @tags: [ - * requires_fcv_53, - * featureFlagNoChangeStreamEventsDueToOrphans, - * ] */ (function() { 'use strict'; diff --git a/jstests/sharding/multi_update_orphan_shard_key.js b/jstests/sharding/multi_update_orphan_shard_key.js index 8f93fff268e..80741e397a4 100644 --- a/jstests/sharding/multi_update_orphan_shard_key.js +++ b/jstests/sharding/multi_update_orphan_shard_key.js @@ -43,18 +43,8 @@ assert.eq(1, res.nModified, res); // Do a multi=true update that will target both shards but not update any documents on the shard // which owns the range [-1, MaxKey]. -const clusterParams = st.configRS.getPrimary().adminCommand( - {getParameter: 1, featureFlagNoChangeStreamEventsDueToOrphans: 1}); -if (!clusterParams.hasOwnProperty("featureFlagNoChangeStreamEventsDueToOrphans") || - !clusterParams.featureFlagNoChangeStreamEventsDueToOrphans.value) { - res = assert.commandFailedWithCode( - collection.update( - {x: {$lte: 0}, y: {$exists: false}}, {$set: {x: -10, y: 2}}, {multi: true}), - 31025); -} else { - res = assert.commandWorked(collection.update( - {x: {$lte: 0}, y: {$exists: false}}, {$set: {x: -10, y: 2}}, {multi: true})); -} +res = assert.commandWorked( + collection.update({x: {$lte: 0}, y: {$exists: false}}, {$set: {x: -10, y: 2}}, {multi: true})); assert.eq(0, res.nMatched, res); assert.eq(0, res.nModified, res); assert.eq(0, res.nUpserted, res); diff --git a/src/mongo/db/exec/batched_delete_stage.cpp b/src/mongo/db/exec/batched_delete_stage.cpp index 624eb15e180..3413f9baaa8 100644 --- a/src/mongo/db/exec/batched_delete_stage.cpp +++ b/src/mongo/db/exec/batched_delete_stage.cpp @@ -43,7 +43,6 @@ #include "mongo/db/query/plan_executor_impl.h" #include "mongo/db/service_context.h" #include "mongo/logv2/log.h" -#include "mongo/s/pm2423_feature_flags_gen.h" #include "mongo/util/scopeguard.h" #define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kWrite diff --git a/src/mongo/db/exec/write_stage_common.cpp b/src/mongo/db/exec/write_stage_common.cpp index 3d885d9d50e..28ffbe96b86 100644 --- a/src/mongo/db/exec/write_stage_common.cpp +++ b/src/mongo/db/exec/write_stage_common.cpp @@ -39,7 +39,6 @@ #include "mongo/db/s/collection_sharding_state.h" #include "mongo/db/s/operation_sharding_state.h" #include "mongo/logv2/redaction.h" -#include "mongo/s/pm2423_feature_flags_gen.h" #define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kWrite @@ -49,14 +48,7 @@ namespace mongo { namespace write_stage_common { PreWriteFilter::PreWriteFilter(OperationContext* opCtx, NamespaceString nss) - : _opCtx(opCtx), - _nss(std::move(nss)), - _isEnabled([] { - auto& fcv = serverGlobalParams.featureCompatibility; - return fcv.isVersionInitialized() && - feature_flags::gFeatureFlagNoChangeStreamEventsDueToOrphans.isEnabled(fcv); - }()), - _skipFiltering([&] { + : _opCtx(opCtx), _nss(std::move(nss)), _skipFiltering([&] { // Always allow writes on replica sets. if (serverGlobalParams.clusterRole == ClusterRole::None) { return true; @@ -68,10 +60,6 @@ PreWriteFilter::PreWriteFilter(OperationContext* opCtx, NamespaceString nss) }()) {} PreWriteFilter::Action PreWriteFilter::computeAction(const Document& doc) { - // Skip the checks if the Filter is not enabled. - if (!_isEnabled) - return Action::kWrite; - if (_skipFiltering) { // Secondaries do not apply any filtering logic as the primary already did. return Action::kWrite; diff --git a/src/mongo/db/exec/write_stage_common.h b/src/mongo/db/exec/write_stage_common.h index 5628822efff..870178f67c7 100644 --- a/src/mongo/db/exec/write_stage_common.h +++ b/src/mongo/db/exec/write_stage_common.h @@ -79,7 +79,6 @@ private: OperationContext* _opCtx; NamespaceString _nss; - const bool _isEnabled; const bool _skipFiltering; std::unique_ptr _shardFilterer; }; diff --git a/src/mongo/db/s/migration_destination_manager.cpp b/src/mongo/db/s/migration_destination_manager.cpp index 0093333fa31..bc707e25182 100644 --- a/src/mongo/db/s/migration_destination_manager.cpp +++ b/src/mongo/db/s/migration_destination_manager.cpp @@ -77,7 +77,6 @@ #include "mongo/s/client/shard_registry.h" #include "mongo/s/cluster_commands_helpers.h" #include "mongo/s/grid.h" -#include "mongo/s/pm2423_feature_flags_gen.h" #include "mongo/s/shard_key_pattern.h" #include "mongo/s/sharding_feature_flags_gen.h" #include "mongo/stdx/chrono.h" diff --git a/src/mongo/s/SConscript b/src/mongo/s/SConscript index c8e55c6dbe5..0b02bdfc8e3 100644 --- a/src/mongo/s/SConscript +++ b/src/mongo/s/SConscript @@ -171,7 +171,6 @@ env.Library( 'database_version.cpp', 'database_version.idl', 'mongod_and_mongos_server_parameters.idl', - 'pm2423_feature_flags.idl', 'request_types/abort_reshard_collection.idl', 'request_types/add_shard_request_type.cpp', 'request_types/get_stats_for_balancing.idl', diff --git a/src/mongo/s/pm2423_feature_flags.idl b/src/mongo/s/pm2423_feature_flags.idl deleted file mode 100644 index ac0b4736a1a..00000000000 --- a/src/mongo/s/pm2423_feature_flags.idl +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (C) 2021-present MongoDB, Inc. -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the Server Side Public License, version 1, -# as published by MongoDB, Inc. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# Server Side Public License for more details. -# -# You should have received a copy of the Server Side Public License -# along with this program. If not, see -# . -# -# As a special exception, the copyright holders give permission to link the -# code of portions of this program with the OpenSSL library under certain -# conditions as described in each individual source file and distribute -# linked combinations including the program with the OpenSSL library. You -# must comply with the Server Side Public License in all respects for -# all of the code used other than as permitted herein. If you modify file(s) -# with this exception, you may extend this exception to your version of the -# file(s), but you are not obligated to do so. If you do not wish to do so, -# delete this exception statement from your version. If you delete this -# exception statement from all source files in the program, then also delete -# it in the license file. -# - -# Feature flag for PM-2423 - -global: - cpp_namespace: "mongo::feature_flags" - -imports: - - "mongo/idl/basic_types.idl" - -feature_flags: - featureFlagNoChangeStreamEventsDueToOrphans: - description: Feature flag for preventing the generation of change stream events due to - writes on orphan documents. - cpp_varname: gFeatureFlagNoChangeStreamEventsDueToOrphans - default: true - version: 5.3