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-05 18:01:11 +0000
commit5ffbe2516fa2899a70b32217f668de2ba4d1c6ac (patch)
tree07600c25f0697fbfe8d948ae13fb54956e634d50
parent775d99634efc04ee26721366986bb0a385115c94 (diff)
downloadmongo-5ffbe2516fa2899a70b32217f668de2ba4d1c6ac.tar.gz
SERVER-62192 Check feature flag for sharding timeseries collection on shards in implicit sharding accessed collections
(cherry picked from commit ab91beea0deb3f4ca5929066b9ba23a0cfc7796c)
-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;
}