summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Zhang <jason.zhang@mongodb.com>2020-09-17 21:42:04 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-10-22 16:21:58 +0000
commit3dd228b0fd7105409eee46c9fbf5965994d74877 (patch)
tree7dc0a3821405afc43a3c85d7dcc97bac63f11b8b
parent47ed9285087dc58cab303fe606f35ab7d0928b7d (diff)
downloadmongo-3dd228b0fd7105409eee46c9fbf5965994d74877.tar.gz
SERVER-50900 Disable PeriodicShardedIndexConsistencyChecker for cursor_valid_after_shard_stepdown.js
(cherry picked from commit eaa9b518099c250cbb3083ed84636922a5b29feb)
-rw-r--r--jstests/sharding/cursor_valid_after_shard_stepdown.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/jstests/sharding/cursor_valid_after_shard_stepdown.js b/jstests/sharding/cursor_valid_after_shard_stepdown.js
index c96ce21ab3d..574eb603e54 100644
--- a/jstests/sharding/cursor_valid_after_shard_stepdown.js
+++ b/jstests/sharding/cursor_valid_after_shard_stepdown.js
@@ -9,6 +9,12 @@ TestData.skipCheckOrphans = true;
var st = new ShardingTest({shards: 1, rs: {nodes: 2}});
+// This test expects the shard version after step down to be UNKNOWN. Disable checking for index
+// consistency to ensure that the config server doesn't trigger a StaleShardVersion exception on
+// shard0 and cause it to refresh its sharding metadata.
+st._configServers.forEach(
+ config => config.adminCommand({setParameter: 1, enableShardedIndexConsistencyCheck: false}));
+
assert.commandWorked(st.s0.adminCommand({enablesharding: 'TestDB'}));
st.ensurePrimaryShard('TestDB', st.shard0.shardName);
assert.commandWorked(st.s0.adminCommand({shardcollection: 'TestDB.TestColl', key: {x: 1}}));