diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2017-12-05 13:43:52 -0500 |
---|---|---|
committer | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2018-11-14 09:47:52 -0500 |
commit | dcf7e0dd89d34f58b592f1adb3d41e5edd6e2012 (patch) | |
tree | 36664490ee71eb77ddf183dcd5c642b3e732f179 /jstests/sharding/cursor_valid_after_shard_stepdown.js | |
parent | c2cc425b9d2b23eead06ecbfd996375e47c81baa (diff) | |
download | mongo-dcf7e0dd89d34f58b592f1adb3d41e5edd6e2012.tar.gz |
SERVER-32198 Split CollectionShardingState::getMetadata into three methods
o getCurrentMetadataIfKnown - which returns the current filtering
metadata if any is available
o getMetadataForOperation - which returns the metadata which is required
by the current opertion, based on the OperationShardingState
o getCurrentMetadata - which returns the currently available filtering
metadata (or UNSHARDED if not known)
This is in preparation for making
getMetadataForOperation/getCurrentMetadata throw
StaleShardVersion exception if the metadata has not been loaded yet.
Diffstat (limited to 'jstests/sharding/cursor_valid_after_shard_stepdown.js')
-rw-r--r-- | jstests/sharding/cursor_valid_after_shard_stepdown.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/jstests/sharding/cursor_valid_after_shard_stepdown.js b/jstests/sharding/cursor_valid_after_shard_stepdown.js index ea0dd72338f..01e7ee57c30 100644 --- a/jstests/sharding/cursor_valid_after_shard_stepdown.js +++ b/jstests/sharding/cursor_valid_after_shard_stepdown.js @@ -38,10 +38,11 @@ TestData.skipCheckingUUIDsConsistentAcrossCluster = true; 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(Timestamp(0, 0), shardVersionAfterStepdown); + assert.eq("UNKNOWN", shardVersionAfterStepdown); st.stop(); })(); |