summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRui Liu <rui.liu@mongodb.com>2022-01-04 19:01:03 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-01-04 19:37:56 +0000
commitab91beea0deb3f4ca5929066b9ba23a0cfc7796c (patch)
tree0555aedf2c15f71fd90a1f9159d5078e4acbf73d
parent5a243e404806f10a5e55db5013d42b4321992c09 (diff)
downloadmongo-ab91beea0deb3f4ca5929066b9ba23a0cfc7796c.tar.gz
SERVER-62192 Check feature flag for sharding timeseries collection on shards in implicit sharding accessed collections
-rw-r--r--jstests/libs/override_methods/implicitly_shard_accessed_collections.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/jstests/libs/override_methods/implicitly_shard_accessed_collections.js b/jstests/libs/override_methods/implicitly_shard_accessed_collections.js
index 07355dc7126..cdcd06b501e 100644
--- a/jstests/libs/override_methods/implicitly_shard_accessed_collections.js
+++ b/jstests/libs/override_methods/implicitly_shard_accessed_collections.js
@@ -37,6 +37,7 @@ const ImplicitlyShardAccessCollSettings = (function() {
'use strict';
load("jstests/libs/override_methods/override_helpers.js"); // For 'OverrideHelpers'.
+load("jstests/libs/fixture_helpers.js"); // For 'FixtureHelpers'.
// Save a reference to the original methods in the IIFE's scope.
// This scoping allows the original methods to be called by the overrides below.
@@ -135,9 +136,12 @@ DB.prototype.createCollection = function() {
return createCollResult;
}
- const parameterResult = this.adminCommand({getParameter: 1, featureFlagShardedTimeSeries: 1});
+ const parameterResults = FixtureHelpers.runCommandOnEachPrimary({
+ db: this.getSiblingDB('admin'),
+ cmdObj: {getParameter: 1, featureFlagShardedTimeSeries: 1}
+ });
const isTimeseriesShardingEnabled =
- parameterResult.ok && parameterResult.featureFlagShardedTimeSeries.value;
+ parameterResults.every(result => result.ok && result.featureFlagShardedTimeSeries.value);
if (!isTimeseriesShardingEnabled) {
return createCollResult;
}