diff options
-rw-r--r-- | jstests/sharding/transactions_stale_shard_version_errors.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/jstests/sharding/transactions_stale_shard_version_errors.js b/jstests/sharding/transactions_stale_shard_version_errors.js index 180b19bf58c..78fd7c970b8 100644 --- a/jstests/sharding/transactions_stale_shard_version_errors.js +++ b/jstests/sharding/transactions_stale_shard_version_errors.js @@ -25,7 +25,13 @@ const dbName = "test"; const collName = "foo"; const ns = dbName + '.' + collName; -const st = new ShardingTest({shards: 3, mongos: 2}); +// 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. +const nodeOptions = { + setParameter: {enableShardedIndexConsistencyCheck: false} +}; + +const st = new ShardingTest({shards: 3, mongos: 2, other: {configOptions: nodeOptions}}); enableStaleVersionAndSnapshotRetriesWithinTransactions(st); |