Skip to content

Commit

Permalink
Revert "SERVER-82432 Adjust the 'clusterServerParameterRefreshInterva…
Browse files Browse the repository at this point in the history
…lSecs' in query settings related tests to avoid suite timeouts"

This reverts commit 3568a06.
  • Loading branch information
auto-revert-processor authored and Evergreen Agent committed Oct 26, 2023
1 parent 2cb8020 commit 36b6290
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 25 deletions.
7 changes: 0 additions & 7 deletions jstests/core/query/plan_cache/plan_cache_list_plans.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,10 +211,6 @@ if (FeatureFlagUtil.isPresentAndEnabled(db, "QuerySettings")) {
// Set query settings for a query to use 'settings.indexHints.allowedIndexes' indexes.
const qsutils = new QuerySettingsUtils(db, coll.getName());

// Set the 'clusterServerParameterRefreshIntervalSecs' value to 1 second for faster fetching of
// 'querySettings' cluster parameter on mongos from the configsvr.
const clusterParamRefreshSecs = qsutils.setClusterParamRefreshSecs(1);

// Specify 'allowedIndexes' with more than one index, otherwise it will result in single
// solution plan, that won't be cached in classic.
const settings = {indexHints: {allowedIndexes: ["a_1", "a_1_b_1"]}};
Expand All @@ -231,7 +227,4 @@ if (FeatureFlagUtil.isPresentAndEnabled(db, "QuerySettings")) {
assert.eq(settings, planCacheEntry.querySettings, planCacheEntry);

qsutils.removeAllQuerySettings();

// Reset the 'clusterServerParameterRefreshIntervalSecs' parameter to its initial value.
clusterParamRefreshSecs.restore();
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ const collName = jsTestName();

const qsutils = new QuerySettingsUtils(db, collName)

// Set the 'clusterServerParameterRefreshIntervalSecs' value to 1 second for faster fetching of
// 'querySettings' cluster parameter on mongos from the configsvr.
const clusterParamRefreshSecs = qsutils.setClusterParamRefreshSecs(1);

const querySettingsA = {
indexHints: {allowedIndexes: ["a_1", {$natural: 1}]}
};
Expand Down Expand Up @@ -144,6 +140,3 @@ const nonExistentQueryShapeHash = "0".repeat(64);
}),
7746608);
}

// Reset the 'clusterServerParameterRefreshIntervalSecs' parameter to its initial value.
clusterParamRefreshSecs.restore();
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,7 @@
import {QuerySettingsUtils} from "jstests/libs/query_settings_utils.js";

const collName = jsTestName();
const qsutils = new QuerySettingsUtils(db, collName);

// Set the 'clusterServerParameterRefreshIntervalSecs' value to 1 second for faster fetching of
// 'querySettings' cluster parameter on mongos from the configsvr.
const clusterParamRefreshSecs = qsutils.setClusterParamRefreshSecs(1);

let qsutils = new QuerySettingsUtils(db, collName);
const settings = {
queryEngineVersion: "v1"
};
Expand Down Expand Up @@ -142,6 +137,3 @@ runTest({
// pipeline: [{"$queue": "[]"}],
// },
// });

// Reset the 'clusterServerParameterRefreshIntervalSecs' parameter to its initial value.
clusterParamRefreshSecs.restore();
4 changes: 2 additions & 2 deletions jstests/libs/query_settings_utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ export class QuerySettingsUtils {

// Adjust the 'clusterServerParameterRefreshIntervalSecs' value for faster fetching of
// 'querySettings' cluster parameter on mongos from the configsvr.
// TODO: SERVER-81062 Update cluster parameter cache on set-/removeQuerySettings and perform
// single retry on failure.
// TODO: Update cluster parameter cache on set-/removeQuerySettings and perform single retry on
// failure.
setClusterParamRefreshSecs(newValue) {
if (FixtureHelpers.isMongos(this.db)) {
const response = assert.commandWorked(this.db.adminCommand(
Expand Down

0 comments on commit 36b6290

Please sign in to comment.