diff options
| author | Arun <arun.banala@mongodb.com> | 2024-08-08 18:02:29 -0700 |
|---|---|---|
| committer | MongoDB Bot <mongo-bot@mongodb.com> | 2024-08-09 01:52:11 +0000 |
| commit | cf76d7ddb07bf9dea1eff22c5976f985c62d01e4 (patch) | |
| tree | 69d5b35f80ed70e4cf0f48fc3d1e5a978a703342 | |
| parent | 7470af341ba121c4d00ca1e5c0ec33a7b6467b30 (diff) | |
Revert "SERVER-75043 Enable feature flag for query stats for data bearing nodes" (#25932)
GitOrigin-RevId: 9949d84570125c5cda2c24912ab5cd667b061558
11 files changed, 27 insertions, 17 deletions
diff --git a/jstests/libs/query_stats_utils.js b/jstests/libs/query_stats_utils.js index e978073199f..bd523ebf121 100644 --- a/jstests/libs/query_stats_utils.js +++ b/jstests/libs/query_stats_utils.js @@ -261,7 +261,10 @@ export function assertExpectedResults(results, for (const field of distributionFields) { assert.neq(totalExecMicros[field], NumberLong(0)); assert.neq(firstResponseExecMicros[field], NumberLong(0)); - assert(bsonWoCompare(workingTimeMillis[field], NumberLong(0)) >= 0); + + // TODO SERVER-93216: Add an assertion for 'workingTimeMillis' after + // 'featureFlagQueryStatsDataBearingNodes' is enabled on 8.0. + if (metrics.execCount > 1) { // If there are prior executions of the same query shape, we can't be certain if those // runs had getMores or not, so we can only check totalExec >= firstResponse. diff --git a/jstests/noPassthrough/log_format_slowms_samplerate_loglevel.js b/jstests/noPassthrough/log_format_slowms_samplerate_loglevel.js index 7d054ea3e69..edcf1a2af72 100644 --- a/jstests/noPassthrough/log_format_slowms_samplerate_loglevel.js +++ b/jstests/noPassthrough/log_format_slowms_samplerate_loglevel.js @@ -480,11 +480,6 @@ for (let testDB of [shardDB, mongosDB]) { unlogged = getUnloggedTests(testsRun, logLines); assert.eq(unlogged.length, 0, unlogged); - // Test with query stats enabled. This should only affect the log format in the mongos case, - // but we'll run against both the mongos and the shard to make sure. - [testsRun, logLines] = runLoggingTests( - {db: testDB, slowMs: -1, logLevel: 0, sampleRate: 1.0, enableQueryStats: true}); - unlogged = getUnloggedTests(testsRun, logLines); - assert.eq(unlogged.length, 0, unlogged); + // TODO SERVER-93216: Add an assertion for enableQueryStats: true } st.stop(); diff --git a/jstests/noPassthrough/queryStats/query_stats_disk_usage_deep_pipelines.js b/jstests/noPassthrough/queryStats/query_stats_disk_usage_deep_pipelines.js index 45271cfe3d8..5f0a6849226 100644 --- a/jstests/noPassthrough/queryStats/query_stats_disk_usage_deep_pipelines.js +++ b/jstests/noPassthrough/queryStats/query_stats_disk_usage_deep_pipelines.js @@ -2,7 +2,9 @@ * Test that query stats are collected from data bearing nodes for aggregate queries involving * recursively nested pipelines (e.g., a $lookup into a $unionWith). * - * @tags: [requires_fcv_80] + * @tags: [ + * featureFlagQueryStatsDataBearingNodes, + * ] */ import {FixtureHelpers} from "jstests/libs/fixture_helpers.js"; diff --git a/jstests/noPassthrough/queryStats/query_stats_disk_usage_find.js b/jstests/noPassthrough/queryStats/query_stats_disk_usage_find.js index eb0e3326c9d..473b5263e21 100644 --- a/jstests/noPassthrough/queryStats/query_stats_disk_usage_find.js +++ b/jstests/noPassthrough/queryStats/query_stats_disk_usage_find.js @@ -1,6 +1,8 @@ /** * Test that query stats are collected from data bearing nodes for find queries. - * @tags: [requires_fcv_80] + * @tags: [ + * featureFlagQueryStatsDataBearingNodes, + * ] */ import { diff --git a/jstests/noPassthrough/queryStats/query_stats_disk_usage_nested_pipelines.js b/jstests/noPassthrough/queryStats/query_stats_disk_usage_nested_pipelines.js index 7136021be9a..b72cb0753ae 100644 --- a/jstests/noPassthrough/queryStats/query_stats_disk_usage_nested_pipelines.js +++ b/jstests/noPassthrough/queryStats/query_stats_disk_usage_nested_pipelines.js @@ -2,7 +2,9 @@ * Test that query stats are collected from data bearing nodes for aggregate queries involving * stages with nested piplines such as $lookup, $unionWith, and $facet. * - * @tags: [requires_fcv_80] + * @tags: [ + * featureFlagQueryStatsDataBearingNodes, + * ] */ import {FixtureHelpers} from "jstests/libs/fixture_helpers.js"; diff --git a/jstests/noPassthrough/queryStats/query_stats_disk_usage_plan_cache.js b/jstests/noPassthrough/queryStats/query_stats_disk_usage_plan_cache.js index ab5e8d5402d..823c960c636 100644 --- a/jstests/noPassthrough/queryStats/query_stats_disk_usage_plan_cache.js +++ b/jstests/noPassthrough/queryStats/query_stats_disk_usage_plan_cache.js @@ -1,6 +1,8 @@ /** * Test that query stats regarding the plan cache are collected from data bearing nodes. - * @tags: [requires_fcv_80] + * @tags: [ + * featureFlagQueryStatsDataBearingNodes, + * ] */ import { diff --git a/jstests/noPassthrough/queryStats/query_stats_disk_usage_sharded.js b/jstests/noPassthrough/queryStats/query_stats_disk_usage_sharded.js index 0cbfc45b632..d13e1c37a08 100644 --- a/jstests/noPassthrough/queryStats/query_stats_disk_usage_sharded.js +++ b/jstests/noPassthrough/queryStats/query_stats_disk_usage_sharded.js @@ -2,7 +2,9 @@ * Test that query stats are collected from data bearing nodes in specific sharding-specific * situations (e.g., a $unionWith targeting multiple sharded collections). * - * @tags: [requires_fcv_80] + * @tags: [ + * featureFlagQueryStatsDataBearingNodes, + * ] */ import { diff --git a/jstests/noPassthrough/queryStats/query_stats_disk_usage_simple_pipelines.js b/jstests/noPassthrough/queryStats/query_stats_disk_usage_simple_pipelines.js index 507990893ea..71d05247717 100644 --- a/jstests/noPassthrough/queryStats/query_stats_disk_usage_simple_pipelines.js +++ b/jstests/noPassthrough/queryStats/query_stats_disk_usage_simple_pipelines.js @@ -1,6 +1,8 @@ /** * Test that query stats are collected from data bearing nodes for simple aggregate queries. - * @tags: [requires_fcv_80] + * @tags: [ + * featureFlagQueryStatsDataBearingNodes, + * ] */ import {FixtureHelpers} from "jstests/libs/fixture_helpers.js"; diff --git a/jstests/noPassthrough/queryStats/query_stats_disk_usage_storage.js b/jstests/noPassthrough/queryStats/query_stats_disk_usage_storage.js index 62d8fc7d41c..3c852f5a083 100644 --- a/jstests/noPassthrough/queryStats/query_stats_disk_usage_storage.js +++ b/jstests/noPassthrough/queryStats/query_stats_disk_usage_storage.js @@ -3,7 +3,8 @@ * @tags: [ * # This test doesn't work with the in-memory storage engine * requires_persistence, - * requires_fcv_80 + * requires_fcv_80, + * featureFlagQueryStatsDataBearingNodes, * ] */ diff --git a/jstests/noPassthroughWithMongod/include_query_stats_metrics.js b/jstests/noPassthroughWithMongod/include_query_stats_metrics.js index fb32e286b54..79f2273d54e 100644 --- a/jstests/noPassthroughWithMongod/include_query_stats_metrics.js +++ b/jstests/noPassthroughWithMongod/include_query_stats_metrics.js @@ -1,6 +1,6 @@ /** * Test the behavior of the includeQueryStatsMetrics option for find, aggregate, and getMore. - * @tags: [requires_fcv_80] + * @tags: [featureFlagQueryStatsDataBearingNodes] * * TODO SERVER-84678: move this test into core once mongos supports includeQueryStatsMetrics */ diff --git a/src/mongo/db/query/query_feature_flags.idl b/src/mongo/db/query/query_feature_flags.idl index 2725a6975aa..3c5e0c36321 100644 --- a/src/mongo/db/query/query_feature_flags.idl +++ b/src/mongo/db/query/query_feature_flags.idl @@ -70,8 +70,7 @@ feature_flags: featureFlagQueryStatsDataBearingNodes: description: "Feature flag for enabling aggregation of queryStats from data bearing nodes." cpp_varname: gFeatureFlagQueryStatsDataBearingNodes - default: true - version: 8.0 + default: false shouldBeFCVGated: true featureFlagSearchBatchSizeLimit: |
