diff options
author | Tommaso Tocci <tommaso.tocci@mongodb.com> | 2020-06-29 16:16:47 +0200 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-06-29 17:18:40 +0000 |
commit | e755577b7d01a1442f14a26c995632c3cf6f6b14 (patch) | |
tree | b85bc6449cc7cf6e22fb7b6501d882563d1b44fc /jstests/sharding/index_commands_shard_targeting.js | |
parent | a7b00001b36b433ce9d0c9a399d9cfb680b29cc8 (diff) | |
download | mongo-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.js | 6 |
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]); |