summaryrefslogtreecommitdiff
path: root/jstests
diff options
context:
space:
mode:
authorAllison Easton <allison.easton@mongodb.com>2021-10-21 08:17:23 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-11-17 09:02:25 +0000
commit1ce8a0f30a173ee3286641edfc155047db336896 (patch)
tree52983f5fb53b85eca20484e44b93da707486d8f9 /jstests
parent756c586e7fc94dd923bfcb20630f88c33f243795 (diff)
downloadmongo-1ce8a0f30a173ee3286641edfc155047db336896.tar.gz
SERVER-60804 Remove shard version checks from cursor_valid_after_shard_stepdown
(cherry picked from commit 19cf54eb17cf933dfabf5a553660d93319e51713)
Diffstat (limited to 'jstests')
-rw-r--r--jstests/sharding/cursor_valid_after_shard_stepdown.js17
1 files changed, 0 insertions, 17 deletions
diff --git a/jstests/sharding/cursor_valid_after_shard_stepdown.js b/jstests/sharding/cursor_valid_after_shard_stepdown.js
index 00c31a8ef0f..2c393091205 100644
--- a/jstests/sharding/cursor_valid_after_shard_stepdown.js
+++ b/jstests/sharding/cursor_valid_after_shard_stepdown.js
@@ -9,12 +9,6 @@ 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}}));
@@ -29,11 +23,6 @@ assert.commandWorked(coll.insert({x: 2, value: 'Test value 2'}));
// Establish a cursor on the primary (by not using secondaryOk read)
var findCursor = assert.commandWorked(db.runCommand({find: 'TestColl', batchSize: 1})).cursor;
-var shardVersionBeforeStepdown =
- assert.commandWorked(st.rs0.getPrimary().adminCommand({getShardVersion: 'TestDB.TestColl'}))
- .global;
-assert.neq(Timestamp(0, 0), shardVersionBeforeStepdown);
-
// Stepdown the primary of the shard and ensure that that cursor can still be read
assert.commandWorked(st.rs0.getPrimary().adminCommand({replSetStepDown: 60, force: 1}));
@@ -42,11 +31,5 @@ var getMoreCursor =
assert.eq(0, getMoreCursor.id);
assert.eq(2, getMoreCursor.nextBatch[0].x);
-// After stepdown, the shard version will be reset
-var shardVersionAfterStepdown =
- assert.commandWorked(st.rs0.getPrimary().adminCommand({getShardVersion: 'TestDB.TestColl'}))
- .global;
-assert.eq("UNKNOWN", shardVersionAfterStepdown);
-
st.stop();
})();