diff options
author | Nick Zolnierz <nicholas.zolnierz@mongodb.com> | 2021-05-27 13:58:09 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-06-01 14:50:37 +0000 |
commit | 8ae3c7b68d9498ced22d966d00b30f3fada71c6e (patch) | |
tree | 43fc2cb1ee28cafd32d84d0fad54f43a914c54c6 | |
parent | dfe4d21d6d08a91cb40eeeb3bd8fadf0cb676790 (diff) | |
download | mongo-8ae3c7b68d9498ced22d966d00b30f3fada71c6e.tar.gz |
SERVER-56197 Remove feature flag for window functions
33 files changed, 13 insertions, 243 deletions
diff --git a/buildscripts/todo_check.py b/buildscripts/todo_check.py index f21a1f31da2..12a2f9b0706 100755 --- a/buildscripts/todo_check.py +++ b/buildscripts/todo_check.py @@ -245,10 +245,10 @@ def main(ticket: Optional[str], base_dir: str, commit_message: Optional[str], \b Search for any TODO references to a given ticket. ``` - > python buildscripts/todo_check.py --ticket SERVER-56197 - SERVER-56197 - ./src/mongo/db/query/query_feature_flags.idl - 33: # TODO SERVER-56197: Remove feature flag. + > python buildscripts/todo_check.py --ticket SERVER-1234 + SERVER-1234 + ./src/mongo/db/file.cpp + 140: // TODO: SERVER-1234: Need to fix this. ``` \b diff --git a/jstests/aggregation/sources/setWindowFields/add_to_set.js b/jstests/aggregation/sources/setWindowFields/add_to_set.js index f84a1df1866..a6370f4c46e 100644 --- a/jstests/aggregation/sources/setWindowFields/add_to_set.js +++ b/jstests/aggregation/sources/setWindowFields/add_to_set.js @@ -6,14 +6,6 @@ load("jstests/aggregation/extras/window_function_helpers.js"); -const featureEnabled = - assert.commandWorked(db.adminCommand({getParameter: 1, featureFlagWindowFunctions: 1})) - .featureFlagWindowFunctions.value; -if (!featureEnabled) { - jsTestLog("Skipping test because the window function feature flag is disabled"); - return; -} - const coll = db[jsTestName()]; coll.drop(); diff --git a/jstests/aggregation/sources/setWindowFields/avg.js b/jstests/aggregation/sources/setWindowFields/avg.js index a9a448cba27..bc2d0a7a6c5 100644 --- a/jstests/aggregation/sources/setWindowFields/avg.js +++ b/jstests/aggregation/sources/setWindowFields/avg.js @@ -6,14 +6,6 @@ load("jstests/aggregation/extras/window_function_helpers.js"); -const featureEnabled = - assert.commandWorked(db.adminCommand({getParameter: 1, featureFlagWindowFunctions: 1})) - .featureFlagWindowFunctions.value; -if (!featureEnabled) { - jsTestLog("Skipping test because the window function feature flag is disabled"); - return; -} - const coll = db[jsTestName()]; coll.drop(); diff --git a/jstests/aggregation/sources/setWindowFields/collation.js b/jstests/aggregation/sources/setWindowFields/collation.js index c2f0b3fe975..4568e36f908 100644 --- a/jstests/aggregation/sources/setWindowFields/collation.js +++ b/jstests/aggregation/sources/setWindowFields/collation.js @@ -5,14 +5,6 @@ (function() { "use strict"; -const featureEnabled = - assert.commandWorked(db.adminCommand({getParameter: 1, featureFlagWindowFunctions: 1})) - .featureFlagWindowFunctions.value; -if (!featureEnabled) { - jsTestLog("Skipping test because the window function feature flag is disabled"); - return; -} - const coll = db[jsTestName()]; coll.drop(); diff --git a/jstests/aggregation/sources/setWindowFields/count.js b/jstests/aggregation/sources/setWindowFields/count.js index 086d77d58a9..13fbe83c537 100644 --- a/jstests/aggregation/sources/setWindowFields/count.js +++ b/jstests/aggregation/sources/setWindowFields/count.js @@ -6,14 +6,6 @@ load("jstests/aggregation/extras/utils.js"); // documentEq -const featureEnabled = - assert.commandWorked(db.adminCommand({getParameter: 1, featureFlagWindowFunctions: 1})) - .featureFlagWindowFunctions.value; -if (!featureEnabled) { - jsTestLog("Skipping test because the window function feature flag is disabled"); - return; -} - const coll = db[jsTestName()]; coll.drop(); diff --git a/jstests/aggregation/sources/setWindowFields/covariance.js b/jstests/aggregation/sources/setWindowFields/covariance.js index bb1d24639aa..8f2b3e23194 100644 --- a/jstests/aggregation/sources/setWindowFields/covariance.js +++ b/jstests/aggregation/sources/setWindowFields/covariance.js @@ -6,14 +6,6 @@ load("jstests/aggregation/extras/window_function_helpers.js"); -const featureEnabled = - assert.commandWorked(db.adminCommand({getParameter: 1, featureFlagWindowFunctions: 1})) - .featureFlagWindowFunctions.value; -if (!featureEnabled) { - jsTestLog("Skipping test because the window function feature flag is disabled"); - return; -} - const coll = db[jsTestName()]; coll.drop(); diff --git a/jstests/aggregation/sources/setWindowFields/derivative.js b/jstests/aggregation/sources/setWindowFields/derivative.js index 18d12893c10..173f7e5e493 100644 --- a/jstests/aggregation/sources/setWindowFields/derivative.js +++ b/jstests/aggregation/sources/setWindowFields/derivative.js @@ -4,14 +4,6 @@ (function() { "use strict"; -const getParam = db.adminCommand({getParameter: 1, featureFlagWindowFunctions: 1}); -jsTestLog(getParam); -const featureEnabled = assert.commandWorked(getParam).featureFlagWindowFunctions.value; -if (!featureEnabled) { - jsTestLog("Skipping test because the window function feature flag is disabled"); - return; -} - const coll = db.setWindowFields_derivative; // The default window is usually [unbounded, unbounded], but this would be surprising for diff --git a/jstests/aggregation/sources/setWindowFields/desugar.js b/jstests/aggregation/sources/setWindowFields/desugar.js index efd46c8bdc4..a758bc55133 100644 --- a/jstests/aggregation/sources/setWindowFields/desugar.js +++ b/jstests/aggregation/sources/setWindowFields/desugar.js @@ -13,14 +13,6 @@ (function() { "use strict"; -const getParam = db.adminCommand({getParameter: 1, featureFlagWindowFunctions: 1}); -jsTestLog(getParam); -const featureEnabled = assert.commandWorked(getParam).featureFlagWindowFunctions.value; -if (!featureEnabled) { - jsTestLog("Skipping test because the window function feature flag is disabled"); - return; -} - const coll = db[jsTestName()]; coll.insert({}); diff --git a/jstests/aggregation/sources/setWindowFields/empty_window.js b/jstests/aggregation/sources/setWindowFields/empty_window.js index 8f74cc06ceb..9770b3495a5 100644 --- a/jstests/aggregation/sources/setWindowFields/empty_window.js +++ b/jstests/aggregation/sources/setWindowFields/empty_window.js @@ -4,15 +4,6 @@ (function() { "use strict"; -load("jstests/aggregation/extras/utils.js"); // documentEq -const featureEnabled = - assert.commandWorked(db.adminCommand({getParameter: 1, featureFlagWindowFunctions: 1})) - .featureFlagWindowFunctions.value; -if (!featureEnabled) { - jsTestLog("Skipping test because the window function feature flag is disabled"); - return; -} - const coll = db[jsTestName()]; coll.drop(); diff --git a/jstests/aggregation/sources/setWindowFields/exclude_from_api_version_1.js b/jstests/aggregation/sources/setWindowFields/exclude_from_api_version_1.js index 87c34a581ba..4224e51e825 100644 --- a/jstests/aggregation/sources/setWindowFields/exclude_from_api_version_1.js +++ b/jstests/aggregation/sources/setWindowFields/exclude_from_api_version_1.js @@ -4,14 +4,6 @@ (function() { "use strict"; -const featureEnabled = - assert.commandWorked(db.adminCommand({getParameter: 1, featureFlagWindowFunctions: 1})) - .featureFlagWindowFunctions.value; -if (!featureEnabled) { - jsTestLog("Skipping test because the window function feature flag is disabled"); - return; -} - const coll = db[jsTestName()]; coll.drop(); coll.insert({a: 1}); diff --git a/jstests/aggregation/sources/setWindowFields/exp_moving_avg.js b/jstests/aggregation/sources/setWindowFields/exp_moving_avg.js index 3e5f89a3eeb..a7d0028583f 100644 --- a/jstests/aggregation/sources/setWindowFields/exp_moving_avg.js +++ b/jstests/aggregation/sources/setWindowFields/exp_moving_avg.js @@ -6,14 +6,6 @@ load("jstests/aggregation/extras/window_function_helpers.js"); -const featureEnabled = - assert.commandWorked(db.adminCommand({getParameter: 1, featureFlagWindowFunctions: 1})) - .featureFlagWindowFunctions.value; -if (!featureEnabled) { - jsTestLog("Skipping test because the window function feature flag is disabled"); - return; -} - const coll = db[jsTestName()]; coll.drop(); diff --git a/jstests/aggregation/sources/setWindowFields/explain.js b/jstests/aggregation/sources/setWindowFields/explain.js index b7542771944..a070aae7b0e 100644 --- a/jstests/aggregation/sources/setWindowFields/explain.js +++ b/jstests/aggregation/sources/setWindowFields/explain.js @@ -20,14 +20,6 @@ const nPartitions = 50; // Not const because post-cache doc size changes based on the number of fields accessed. let docSize = 2332; -const featureEnabled = - assert.commandWorked(db.adminCommand({getParameter: 1, featureFlagWindowFunctions: 1})) - .featureFlagWindowFunctions.value; -if (!featureEnabled) { - jsTestLog("Skipping test because the window function feature flag is disabled"); - return; -} - let bulk = coll.initializeUnorderedBulkOp(); for (let i = 1; i <= nDocs; i++) { bulk.insert({_id: i, key: i % nPartitions, bigStr: bigStr}); diff --git a/jstests/aggregation/sources/setWindowFields/first.js b/jstests/aggregation/sources/setWindowFields/first.js index e5043250d7e..599bddf35cd 100644 --- a/jstests/aggregation/sources/setWindowFields/first.js +++ b/jstests/aggregation/sources/setWindowFields/first.js @@ -6,14 +6,6 @@ load("jstests/aggregation/extras/window_function_helpers.js"); -const getParam = db.adminCommand({getParameter: 1, featureFlagWindowFunctions: 1}); -jsTestLog(getParam); -const featureEnabled = assert.commandWorked(getParam).featureFlagWindowFunctions.value; -if (!featureEnabled) { - jsTestLog("Skipping test because the window function feature flag is disabled"); - return; -} - const coll = db[jsTestName()]; coll.drop(); diff --git a/jstests/aggregation/sources/setWindowFields/integral.js b/jstests/aggregation/sources/setWindowFields/integral.js index bceedb1463d..097ea70536a 100644 --- a/jstests/aggregation/sources/setWindowFields/integral.js +++ b/jstests/aggregation/sources/setWindowFields/integral.js @@ -6,14 +6,6 @@ load("jstests/aggregation/extras/window_function_helpers.js"); -const getParam = db.adminCommand({getParameter: 1, featureFlagWindowFunctions: 1}); -jsTestLog(getParam); -const featureEnabled = assert.commandWorked(getParam).featureFlagWindowFunctions.value; -if (!featureEnabled) { - jsTestLog("Skipping test because the window function feature flag is disabled"); - return; -} - const coll = db.setWindowFields_integral; // Like most other window functions, the default window for $integral is [unbounded, unbounded]. diff --git a/jstests/aggregation/sources/setWindowFields/last.js b/jstests/aggregation/sources/setWindowFields/last.js index b974497fb40..6cd69979add 100644 --- a/jstests/aggregation/sources/setWindowFields/last.js +++ b/jstests/aggregation/sources/setWindowFields/last.js @@ -6,14 +6,6 @@ load("jstests/aggregation/extras/window_function_helpers.js"); -const getParam = db.adminCommand({getParameter: 1, featureFlagWindowFunctions: 1}); -jsTestLog(getParam); -const featureEnabled = assert.commandWorked(getParam).featureFlagWindowFunctions.value; -if (!featureEnabled) { - jsTestLog("Skipping test because the window function feature flag is disabled"); - return; -} - const coll = db[jsTestName()]; coll.drop(); diff --git a/jstests/aggregation/sources/setWindowFields/memory_limit.js b/jstests/aggregation/sources/setWindowFields/memory_limit.js index b18678df911..437aa37d654 100644 --- a/jstests/aggregation/sources/setWindowFields/memory_limit.js +++ b/jstests/aggregation/sources/setWindowFields/memory_limit.js @@ -10,14 +10,6 @@ load("jstests/libs/fixture_helpers.js"); // For FixtureH load("jstests/noPassthrough/libs/server_parameter_helpers.js"); // For setParameterOnAllHosts. load("jstests/libs/discover_topology.js"); // For findNonConfigNodes. -const featureEnabled = - assert.commandWorked(db.adminCommand({getParameter: 1, featureFlagWindowFunctions: 1})) - .featureFlagWindowFunctions.value; -if (!featureEnabled) { - jsTestLog("Skipping test because the window function feature flag is disabled"); - return; -} - const coll = db[jsTestName()]; coll.drop(); diff --git a/jstests/aggregation/sources/setWindowFields/min_max.js b/jstests/aggregation/sources/setWindowFields/min_max.js index 6dd4bc90746..d15d6e11991 100644 --- a/jstests/aggregation/sources/setWindowFields/min_max.js +++ b/jstests/aggregation/sources/setWindowFields/min_max.js @@ -6,14 +6,6 @@ load("jstests/aggregation/extras/window_function_helpers.js"); -const featureEnabled = - assert.commandWorked(db.adminCommand({getParameter: 1, featureFlagWindowFunctions: 1})) - .featureFlagWindowFunctions.value; -if (!featureEnabled) { - jsTestLog("Skipping test because the window function feature flag is disabled"); - return; -} - const coll = db[jsTestName()]; coll.drop(); diff --git a/jstests/aggregation/sources/setWindowFields/optimize.js b/jstests/aggregation/sources/setWindowFields/optimize.js index d66da64cec1..14b643696ff 100644 --- a/jstests/aggregation/sources/setWindowFields/optimize.js +++ b/jstests/aggregation/sources/setWindowFields/optimize.js @@ -11,14 +11,6 @@ (function() { "use strict"; -const featureEnabled = - assert.commandWorked(db.adminCommand({getParameter: 1, featureFlagWindowFunctions: 1})) - .featureFlagWindowFunctions.value; -if (!featureEnabled) { - jsTestLog("Skipping test because the window function feature flag is disabled"); - return; -} - load('jstests/libs/analyze_plan.js'); // Find how many stages of the plan are 'stageName'. diff --git a/jstests/aggregation/sources/setWindowFields/parse.js b/jstests/aggregation/sources/setWindowFields/parse.js index c9361d560cc..242bf2185da 100644 --- a/jstests/aggregation/sources/setWindowFields/parse.js +++ b/jstests/aggregation/sources/setWindowFields/parse.js @@ -8,14 +8,6 @@ (function() { "use strict"; -const getParam = db.adminCommand({getParameter: 1, featureFlagWindowFunctions: 1}); -jsTestLog(getParam); -const featureEnabled = assert.commandWorked(getParam).featureFlagWindowFunctions.value; -if (!featureEnabled) { - jsTestLog("Skipping test because the window function feature flag is disabled"); - return; -} - const coll = db.setWindowFields_parse; coll.drop(); diff --git a/jstests/aggregation/sources/setWindowFields/partition.js b/jstests/aggregation/sources/setWindowFields/partition.js index 681264ab500..db0b5bd39dc 100644 --- a/jstests/aggregation/sources/setWindowFields/partition.js +++ b/jstests/aggregation/sources/setWindowFields/partition.js @@ -12,13 +12,6 @@ "use strict"; load('jstests/aggregation/extras/utils.js'); // For resultsEq. -const getParam = db.adminCommand({getParameter: 1, featureFlagWindowFunctions: 1}); -jsTestLog(getParam); -const featureEnabled = assert.commandWorked(getParam).featureFlagWindowFunctions.value; -if (!featureEnabled) { - jsTestLog("Skipping test because the window function feature flag is disabled"); - return; -} const coll = db[jsTestName()]; coll.drop(); diff --git a/jstests/aggregation/sources/setWindowFields/push.js b/jstests/aggregation/sources/setWindowFields/push.js index 0bf521d472d..d512def4329 100644 --- a/jstests/aggregation/sources/setWindowFields/push.js +++ b/jstests/aggregation/sources/setWindowFields/push.js @@ -6,14 +6,6 @@ load("jstests/aggregation/extras/window_function_helpers.js"); -const featureEnabled = - assert.commandWorked(db.adminCommand({getParameter: 1, featureFlagWindowFunctions: 1})) - .featureFlagWindowFunctions.value; -if (!featureEnabled) { - jsTestLog("Skipping test because the window function feature flag is disabled"); - return; -} - const coll = db[jsTestName()]; coll.drop(); diff --git a/jstests/aggregation/sources/setWindowFields/range.js b/jstests/aggregation/sources/setWindowFields/range.js index 6ab49b242cf..96a3dc72eac 100644 --- a/jstests/aggregation/sources/setWindowFields/range.js +++ b/jstests/aggregation/sources/setWindowFields/range.js @@ -6,14 +6,6 @@ load("jstests/aggregation/extras/window_function_helpers.js"); -const featureEnabled = - assert.commandWorked(db.adminCommand({getParameter: 1, featureFlagWindowFunctions: 1})) - .featureFlagWindowFunctions.value; -if (!featureEnabled) { - jsTestLog("Skipping test because the window function feature flag is disabled"); - return; -} - const coll = db.setWindowFields_range; coll.drop(); diff --git a/jstests/aggregation/sources/setWindowFields/rank.js b/jstests/aggregation/sources/setWindowFields/rank.js index c6aec660cfb..75662829d60 100644 --- a/jstests/aggregation/sources/setWindowFields/rank.js +++ b/jstests/aggregation/sources/setWindowFields/rank.js @@ -5,13 +5,7 @@ "use strict"; load("jstests/aggregation/extras/utils.js"); // documentEq -const featureEnabled = - assert.commandWorked(db.adminCommand({getParameter: 1, featureFlagWindowFunctions: 1})) - .featureFlagWindowFunctions.value; -if (!featureEnabled) { - jsTestLog("Skipping test because the window function feature flag is disabled"); - return; -} + const coll = db[jsTestName()]; for (let i = 0; i < 12; i++) { coll.insert({_id: i, double: Math.floor(i / 2)}); diff --git a/jstests/aggregation/sources/setWindowFields/shift.js b/jstests/aggregation/sources/setWindowFields/shift.js index fe7af7b953c..6c3f38a8226 100644 --- a/jstests/aggregation/sources/setWindowFields/shift.js +++ b/jstests/aggregation/sources/setWindowFields/shift.js @@ -6,14 +6,6 @@ load("jstests/aggregation/extras/utils.js"); // documentEq -const featureEnabled = - assert.commandWorked(db.adminCommand({getParameter: 1, featureFlagWindowFunctions: 1})) - .featureFlagWindowFunctions.value; -if (!featureEnabled) { - jsTestLog("Skipping test because the window function feature flag is disabled"); - return; -} - const coll = db[jsTestName()]; coll.drop(); diff --git a/jstests/aggregation/sources/setWindowFields/spill_to_disk.js b/jstests/aggregation/sources/setWindowFields/spill_to_disk.js index 0e7bbadde59..88d4823719f 100644 --- a/jstests/aggregation/sources/setWindowFields/spill_to_disk.js +++ b/jstests/aggregation/sources/setWindowFields/spill_to_disk.js @@ -15,13 +15,6 @@ load("jstests/libs/analyze_plan.js"); // For getAggPlanStages(). load("jstests/aggregation/extras/utils.js"); // arrayEq. load("jstests/libs/profiler.js"); // getLatestProfileEntry. -const featureEnabled = - assert.commandWorked(db.adminCommand({getParameter: 1, featureFlagWindowFunctions: 1})) - .featureFlagWindowFunctions.value; -if (!featureEnabled) { - jsTestLog("Skipping test because the window function feature flag is disabled"); - return; -} const origParamValue = assert.commandWorked(db.adminCommand({ getParameter: 1, internalDocumentSourceSetWindowFieldsMaxMemoryBytes: 1 diff --git a/jstests/aggregation/sources/setWindowFields/stddev.js b/jstests/aggregation/sources/setWindowFields/stddev.js index a50c4cada27..caa76b49268 100644 --- a/jstests/aggregation/sources/setWindowFields/stddev.js +++ b/jstests/aggregation/sources/setWindowFields/stddev.js @@ -6,14 +6,6 @@ load("jstests/aggregation/extras/window_function_helpers.js"); -const featureEnabled = - assert.commandWorked(db.adminCommand({getParameter: 1, featureFlagWindowFunctions: 1})) - .featureFlagWindowFunctions.value; -if (!featureEnabled) { - jsTestLog("Skipping test because the window function feature flag is disabled"); - return; -} - const coll = db[jsTestName()]; coll.drop(); diff --git a/jstests/aggregation/sources/setWindowFields/sum.js b/jstests/aggregation/sources/setWindowFields/sum.js index 08976e6160b..d8267a84af0 100644 --- a/jstests/aggregation/sources/setWindowFields/sum.js +++ b/jstests/aggregation/sources/setWindowFields/sum.js @@ -5,15 +5,7 @@ "use strict"; load("jstests/aggregation/extras/window_function_helpers.js"); - load("jstests/aggregation/extras/utils.js"); // documentEq -const featureEnabled = - assert.commandWorked(db.adminCommand({getParameter: 1, featureFlagWindowFunctions: 1})) - .featureFlagWindowFunctions.value; -if (!featureEnabled) { - jsTestLog("Skipping test because the window function feature flag is disabled"); - return; -} const coll = db[jsTestName()]; coll.drop(); diff --git a/jstests/aggregation/sources/setWindowFields/time.js b/jstests/aggregation/sources/setWindowFields/time.js index 98692489c3e..e4f7d7cfa6c 100644 --- a/jstests/aggregation/sources/setWindowFields/time.js +++ b/jstests/aggregation/sources/setWindowFields/time.js @@ -6,14 +6,6 @@ load("jstests/aggregation/extras/window_function_helpers.js"); -const featureEnabled = - assert.commandWorked(db.adminCommand({getParameter: 1, featureFlagWindowFunctions: 1})) - .featureFlagWindowFunctions.value; -if (!featureEnabled) { - jsTestLog("Skipping test because the window function feature flag is disabled"); - return; -} - const coll = db.setWindowFields_time; coll.drop(); diff --git a/jstests/aggregation/sources/setWindowFields/window_functions_on_timeseries_coll.js b/jstests/aggregation/sources/setWindowFields/window_functions_on_timeseries_coll.js index 96219943c5f..a9de018218b 100644 --- a/jstests/aggregation/sources/setWindowFields/window_functions_on_timeseries_coll.js +++ b/jstests/aggregation/sources/setWindowFields/window_functions_on_timeseries_coll.js @@ -18,16 +18,11 @@ load("jstests/aggregation/extras/utils.js"); // For arrayEq. load("jstests/libs/analyze_plan.js"); // For getAggPlanStage(). -const windowFunctionsEnabled = - assert.commandWorked(db.adminCommand({getParameter: 1, featureFlagWindowFunctions: 1})) - .featureFlagWindowFunctions.value; const timeseriesEnabled = assert.commandWorked(db.adminCommand({getParameter: 1, featureFlagTimeseriesCollection: 1})) .featureFlagTimeseriesCollection.value; - -if (!windowFunctionsEnabled || !timeseriesEnabled) { - jsTestLog( - "Skipping test because the window function or time-series collection feature flag is disabled"); +if (!timeseriesEnabled) { + jsTestLog("Skipping test because the time-series collection feature flag is disabled"); return; } diff --git a/jstests/multiVersion/genericSetFCVUsage/view_definition_feature_compatibility_version.js b/jstests/multiVersion/genericSetFCVUsage/view_definition_feature_compatibility_version.js index 189d560336e..2c09d66e811 100644 --- a/jstests/multiVersion/genericSetFCVUsage/view_definition_feature_compatibility_version.js +++ b/jstests/multiVersion/genericSetFCVUsage/view_definition_feature_compatibility_version.js @@ -13,7 +13,7 @@ const testName = "view_definition_feature_compatibility_version_multiversion"; const dbpath = MongoRunner.dataPath + testName; // An array of feature flags that must be enabled to run feature flag tests. -const featureFlagsToEnable = ["featureFlagWindowFunctions"]; +const featureFlagsToEnable = []; // These arrays should be populated with aggregation pipelines that use // aggregation features in new versions of mongod. This test ensures that a view diff --git a/jstests/noPassthrough/deterministic_set_window_fields_knob.js b/jstests/noPassthrough/deterministic_set_window_fields_knob.js index 8de964a6ad3..7087c0b4f25 100644 --- a/jstests/noPassthrough/deterministic_set_window_fields_knob.js +++ b/jstests/noPassthrough/deterministic_set_window_fields_knob.js @@ -5,7 +5,7 @@ (function() { "use strict"; -const conn = MongoRunner.runMongod({setParameter: {featureFlagWindowFunctions: true}}); +const conn = MongoRunner.runMongod(); const dbName = jsTestName(); const db = conn.getDB(dbName); diff --git a/src/mongo/db/pipeline/document_source_set_window_fields.cpp b/src/mongo/db/pipeline/document_source_set_window_fields.cpp index 929690a0713..1e3f549edb7 100644 --- a/src/mongo/db/pipeline/document_source_set_window_fields.cpp +++ b/src/mongo/db/pipeline/document_source_set_window_fields.cpp @@ -37,7 +37,6 @@ #include "mongo/db/pipeline/document_source_set_window_fields_gen.h" #include "mongo/db/pipeline/document_source_sort.h" #include "mongo/db/pipeline/lite_parsed_document_source.h" -#include "mongo/db/query/query_feature_flags_gen.h" #include "mongo/db/query/query_knobs_gen.h" #include "mongo/db/query/sort_pattern.h" #include "mongo/util/visit_helper.h" @@ -74,23 +73,19 @@ bool modifiedSortPaths(const SortPattern& pat, const DocumentSource::GetModPaths } } // namespace -REGISTER_DOCUMENT_SOURCE_CONDITIONALLY( +REGISTER_DOCUMENT_SOURCE_WITH_MIN_VERSION( setWindowFields, LiteParsedDocumentSourceDefault::parse, document_source_set_window_fields::createFromBson, LiteParsedDocumentSource::AllowedWithApiStrict::kNeverInVersion1, - LiteParsedDocumentSource::AllowedWithClientType::kAny, - ServerGlobalParams::FeatureCompatibility::Version::kVersion50, - ::mongo::feature_flags::gFeatureFlagWindowFunctions.isEnabledAndIgnoreFCV()); + ServerGlobalParams::FeatureCompatibility::Version::kVersion50); -REGISTER_DOCUMENT_SOURCE_CONDITIONALLY( +REGISTER_DOCUMENT_SOURCE_WITH_MIN_VERSION( _internalSetWindowFields, LiteParsedDocumentSourceDefault::parse, DocumentSourceInternalSetWindowFields::createFromBson, LiteParsedDocumentSource::AllowedWithApiStrict::kNeverInVersion1, - LiteParsedDocumentSource::AllowedWithClientType::kAny, - ServerGlobalParams::FeatureCompatibility::Version::kVersion50, - ::mongo::feature_flags::gFeatureFlagWindowFunctions.isEnabledAndIgnoreFCV()); + ServerGlobalParams::FeatureCompatibility::Version::kVersion50); list<intrusive_ptr<DocumentSource>> document_source_set_window_fields::createFromBson( BSONElement elem, const intrusive_ptr<ExpressionContext>& expCtx) { diff --git a/src/mongo/db/query/query_feature_flags.idl b/src/mongo/db/query/query_feature_flags.idl index 5d9e5777415..63dc8c0c297 100644 --- a/src/mongo/db/query/query_feature_flags.idl +++ b/src/mongo/db/query/query_feature_flags.idl @@ -30,13 +30,6 @@ global: cpp_namespace: "mongo::feature_flags" feature_flags: - # TODO SERVER-56197: Remove feature flag. - featureFlagWindowFunctions: - description: "Feature flag for aggregation window function stage" - cpp_varname: gFeatureFlagWindowFunctions - default: true - version: 5.0 - featureFlagChangeStreamsOptimization: description: "Feature flag for enabling change streams optimization" cpp_varname: gFeatureFlagChangeStreamsOptimization |