From e1986470a023e3fadc9cf3e7b9889015f63ee4e4 Mon Sep 17 00:00:00 2001 From: Henri Nikku Date: Tue, 26 May 2026 13:25:49 +0100 Subject: [PATCH] SERVER-108086 Enable featureFlagImprovedDepsAnalysis (#54321) GitOrigin-RevId: 414a594b44c75571a691b96338fa0ec5e670b16b --- .../optimization/match_swapping_complex_renames.js | 5 ++++- .../complex_rename_match_swapping_arrayness_pbt.js | 10 +++++----- .../query/computation_hoisting_match_pushdown_pbt.js | 3 ++- src/mongo/db/ifr_flag_registry.yml | 3 ++- src/mongo/db/query/query_feature_flags.idl | 4 ++-- 5 files changed, 15 insertions(+), 10 deletions(-) diff --git a/jstests/aggregation/optimization/match_swapping_complex_renames.js b/jstests/aggregation/optimization/match_swapping_complex_renames.js index 42d3d0794ac..1ec9f7ec5fa 100644 --- a/jstests/aggregation/optimization/match_swapping_complex_renames.js +++ b/jstests/aggregation/optimization/match_swapping_complex_renames.js @@ -4,7 +4,10 @@ * @tags: [ * do_not_wrap_aggregations_in_facets, * requires_pipeline_optimization, - * featureFlagImprovedDepsAnalysis, + * # Tests a rewrite that was added in v9.0. + * requires_fcv_90, + * # Pushdown over complex renames needs PathArrayness from indexes to prove paths are non-array. + * featureFlagPathArrayness, * # The test asserts on explain output. * assumes_unsharded_collection, * ] diff --git a/jstests/core/query/complex_rename_match_swapping_arrayness_pbt.js b/jstests/core/query/complex_rename_match_swapping_arrayness_pbt.js index 3fc25079443..61c230fbca3 100644 --- a/jstests/core/query/complex_rename_match_swapping_arrayness_pbt.js +++ b/jstests/core/query/complex_rename_match_swapping_arrayness_pbt.js @@ -1,14 +1,14 @@ /** - * A property-based test that enables "featureFlagImprovedDepsAnalysis" and asserts correctness - * of pushing down $match on a complex rename when there is multikeyness metadata that proves - * there are no arrays on the renamed path. Correctness is asserted by running the generated query - * with and without optimizations. + * A property-based test that asserts correctness of pushing down $match on a complex rename when + * there is multikeyness metadata that proves there are no arrays on the renamed path. Correctness + * is asserted by running the generated query with and without optimizations. * * @tags: [ * query_intensive_pbt, * # Runs queries that may return many results, requiring getmores * requires_getmore, - * featureFlagImprovedDepsAnalysis, + * # Tests a rewrite that was added in v9.0. + * requires_fcv_90, * featureFlagPathArrayness, * # Time series collections do not support indexing array values in measurement fields. * exclude_from_timeseries_crud_passthrough, diff --git a/jstests/core/query/computation_hoisting_match_pushdown_pbt.js b/jstests/core/query/computation_hoisting_match_pushdown_pbt.js index df27f5d6f7a..8c86e4abb82 100644 --- a/jstests/core/query/computation_hoisting_match_pushdown_pbt.js +++ b/jstests/core/query/computation_hoisting_match_pushdown_pbt.js @@ -8,7 +8,8 @@ * @tags: [ * query_intensive_pbt, * requires_getmore, - * featureFlagImprovedDepsAnalysis, + * # Tests a rewrite that was added in v9.0. + * requires_fcv_90, * # Uses a knob (internalQueryTransformHoistPolicy) that does not exist on older binaries. * multiversion_incompatible, * assumes_unsharded_collection, diff --git a/src/mongo/db/ifr_flag_registry.yml b/src/mongo/db/ifr_flag_registry.yml index 5d6a9b94742..c9a9161268b 100644 --- a/src/mongo/db/ifr_flag_registry.yml +++ b/src/mongo/db/ifr_flag_registry.yml @@ -35,4 +35,5 @@ rollout: featureFlagMultiPlanLimiter: {} featureFlagUnifiedWriteExecutor: {} -released: {} +released: + featureFlagImprovedDepsAnalysis: {} diff --git a/src/mongo/db/query/query_feature_flags.idl b/src/mongo/db/query/query_feature_flags.idl index 6dfd48980e2..fb7a0655d90 100644 --- a/src/mongo/db/query/query_feature_flags.idl +++ b/src/mongo/db/query/query_feature_flags.idl @@ -450,8 +450,8 @@ feature_flags: description: "Feature flag to enable pipeline rewrites that require a dependency graph" cpp_varname: gFeatureFlagImprovedDepsAnalysis fcv_gated: false - default: false - incremental_rollout_phase: in_development + default: true + incremental_rollout_phase: released featureFlagSbeTransformStages: description: "Feature flag to enable transform stages in SBE, including $addFields, $replaceRoot, $replaceWith, $project."