summaryrefslogtreecommitdiff
path: root/jstests
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-02-07 17:15:51 +0000
commit5bfab3626c2b319bba488f9bf2efff5a54a14026 (patch)
treeb228b2128f90123617c801e41f88109db9bb364c /jstests
parentee29d6bace72daae188b931668af2f7416c5c5e7 (diff)
downloadmongo-5bfab3626c2b319bba488f9bf2efff5a54a14026.tar.gz
SERVER-62192 Check feature flag for sharding timeseries collection on shards in implicit sharding accessed collections
(cherry picked from commit ab91beea0deb3f4ca5929066b9ba23a0cfc7796c)
Diffstat (limited to 'jstests')
-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;
}