diff options
author | Allison Easton <allison.easton@mongodb.com> | 2021-10-21 08:17:23 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-11-17 10:10:26 +0000 |
commit | 6c1a502a589b6274825d7be76e6beb4efadb9faf (patch) | |
tree | 27d14fe228fa201a3f89d552b79470ba3b3fae47 | |
parent | 0b01caf40a5a610685c0bf590ff2fa54aadd0443 (diff) | |
download | mongo-6c1a502a589b6274825d7be76e6beb4efadb9faf.tar.gz |
SERVER-60804 Remove shard version checks from cursor_valid_after_shard_stepdown
(cherry picked from commit 19cf54eb17cf933dfabf5a553660d93319e51713)
-rw-r--r-- | jstests/sharding/cursor_valid_after_shard_stepdown.js | 17 |
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 574eb603e54..ce927763170 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 slaveOk 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(); })(); |