summaryrefslogtreecommitdiff
path: root/jstests/sharding/index_commands_shard_targeting.js
diff options
context:
space:
mode:
authorTommaso Tocci <tommaso.tocci@mongodb.com>2020-06-29 16:16:47 +0200
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-06-29 17:18:40 +0000
commite755577b7d01a1442f14a26c995632c3cf6f6b14 (patch)
treeb85bc6449cc7cf6e22fb7b6501d882563d1b44fc /jstests/sharding/index_commands_shard_targeting.js
parenta7b00001b36b433ce9d0c9a399d9cfb680b29cc8 (diff)
downloadmongo-e755577b7d01a1442f14a26c995632c3cf6f6b14.tar.gz
SERVER-48096 PeriodicShardedIndexConsistencyChecker thread on jstests can cause unintended shard refreshes
Diffstat (limited to 'jstests/sharding/index_commands_shard_targeting.js')
-rw-r--r--jstests/sharding/index_commands_shard_targeting.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/jstests/sharding/index_commands_shard_targeting.js b/jstests/sharding/index_commands_shard_targeting.js
index 256e9a3c001..3f588e941bf 100644
--- a/jstests/sharding/index_commands_shard_targeting.js
+++ b/jstests/sharding/index_commands_shard_targeting.js
@@ -105,6 +105,12 @@ function assertCommandBlocksIfCriticalSectionInProgress(
const numShards = 3;
const st = new ShardingTest({shards: numShards});
+
+// Disable checking for index consistency to ensure that the config server doesn't trigger a
+// StaleShardVersion exception on shards and cause them to refresh their sharding metadata.
+st._configServers.forEach(
+ config => config.adminCommand({setParameter: 1, enableShardedIndexConsistencyCheck: false}));
+
const allShards = [];
for (let i = 0; i < numShards; i++) {
allShards.push(st["shard" + i]);