summaryrefslogtreecommitdiff
path: root/jstests/sharding
diff options
context:
space:
mode:
authorJack Mulrow <jack.mulrow@mongodb.com>2018-01-16 18:24:51 -0500
committerJack Mulrow <jack.mulrow@mongodb.com>2018-01-23 10:46:58 -0500
commitdb941ec5d0b27ddbef1c05abeaa56c3ba6caab99 (patch)
tree14cef5752cb677d885772f41975ef4c15dcdac36 /jstests/sharding
parente1c90a380671fc57a076ab5afbd2fab1ae082220 (diff)
downloadmongo-db941ec5d0b27ddbef1c05abeaa56c3ba6caab99.tar.gz
SERVER-32463 Remove FCV dependent miscellaneous sharding code
Diffstat (limited to 'jstests/sharding')
-rw-r--r--jstests/sharding/safe_secondary_reads_drop_recreate.js1
-rw-r--r--jstests/sharding/safe_secondary_reads_single_migration_suspend_range_deletion.js1
-rw-r--r--jstests/sharding/safe_secondary_reads_single_migration_waitForDelete.js1
-rw-r--r--jstests/sharding/secondary_shard_version_protocol_with_fcv.js91
4 files changed, 0 insertions, 94 deletions
diff --git a/jstests/sharding/safe_secondary_reads_drop_recreate.js b/jstests/sharding/safe_secondary_reads_drop_recreate.js
index dbca50a2867..b5a77017e76 100644
--- a/jstests/sharding/safe_secondary_reads_drop_recreate.js
+++ b/jstests/sharding/safe_secondary_reads_drop_recreate.js
@@ -71,7 +71,6 @@
_configsvrMovePrimary: {skip: "primary only"},
_configsvrRemoveShardFromZone: {skip: "primary only"},
_configsvrShardCollection: {skip: "primary only"},
- _configsvrSetFeatureCompatibilityVersion: {skip: "primary only"},
_configsvrUpdateZoneKeyRange: {skip: "primary only"},
_flushRoutingTableCacheUpdates: {skip: "does not return user data"},
_getUserCacheGeneration: {skip: "does not return user data"},
diff --git a/jstests/sharding/safe_secondary_reads_single_migration_suspend_range_deletion.js b/jstests/sharding/safe_secondary_reads_single_migration_suspend_range_deletion.js
index 27890b762f2..f838afffde9 100644
--- a/jstests/sharding/safe_secondary_reads_single_migration_suspend_range_deletion.js
+++ b/jstests/sharding/safe_secondary_reads_single_migration_suspend_range_deletion.js
@@ -78,7 +78,6 @@
_configsvrMovePrimary: {skip: "primary only"},
_configsvrRemoveShardFromZone: {skip: "primary only"},
_configsvrShardCollection: {skip: "primary only"},
- _configsvrSetFeatureCompatibilityVersion: {skip: "primary only"},
_configsvrUpdateZoneKeyRange: {skip: "primary only"},
_flushRoutingTableCacheUpdates: {skip: "does not return user data"},
_getUserCacheGeneration: {skip: "does not return user data"},
diff --git a/jstests/sharding/safe_secondary_reads_single_migration_waitForDelete.js b/jstests/sharding/safe_secondary_reads_single_migration_waitForDelete.js
index c1e0c1725b3..e1ff98b1d2e 100644
--- a/jstests/sharding/safe_secondary_reads_single_migration_waitForDelete.js
+++ b/jstests/sharding/safe_secondary_reads_single_migration_waitForDelete.js
@@ -71,7 +71,6 @@
_configsvrMovePrimary: {skip: "primary only"},
_configsvrRemoveShardFromZone: {skip: "primary only"},
_configsvrShardCollection: {skip: "primary only"},
- _configsvrSetFeatureCompatibilityVersion: {skip: "primary only"},
_configsvrUpdateZoneKeyRange: {skip: "primary only"},
_flushRoutingTableCacheUpdates: {skip: "does not return user data"},
_getUserCacheGeneration: {skip: "does not return user data"},
diff --git a/jstests/sharding/secondary_shard_version_protocol_with_fcv.js b/jstests/sharding/secondary_shard_version_protocol_with_fcv.js
deleted file mode 100644
index 67f55978db0..00000000000
--- a/jstests/sharding/secondary_shard_version_protocol_with_fcv.js
+++ /dev/null
@@ -1,91 +0,0 @@
-/**
- * Tests that v3.6 secondaries do not participate in the shard version protocol while feature
- * compatibility version 3.4 is set. Then tests that v3.6 secondaries do participate when feature
- * compatibility gets raised to 3.6. This is verified by reading orphans on secondaries in fcv 3.4,
- * then not seeing them after fcv 3.6 is set.
- */
-
-// Checking UUID consistency involves talking to a shard node, which in this test is shutdown
-TestData.skipCheckingUUIDsConsistentAcrossCluster = true;
-
-(function() {
- "use strict";
-
- let st = new ShardingTest({mongos: 2, shards: 2, rs: {nodes: 2}});
- let mongos = st.s0, admin = mongos.getDB('admin'), dbName = "testDB", collName = 'testColl',
- ns = dbName + "." + collName, coll = mongos.getCollection(ns), donor = st.shard0,
- recipient = st.shard1, donorColl = donor.getCollection(ns),
- recipientColl = recipient.getCollection(ns);
-
- jsTest.log('Setting feature compatibility to 3.4');
- assert.commandWorked(admin.runCommand({setFeatureCompatibilityVersion: "3.4"}));
-
- jsTest.log('Sharding the collection and pre-splitting into two chunks....');
- assert.commandWorked(admin.runCommand({enableSharding: dbName}));
- st.ensurePrimaryShard(dbName, donor.shardName);
- assert.commandWorked(admin.runCommand({shardCollection: ns, key: {a: 1}}));
- assert.commandWorked(admin.runCommand({split: ns, middle: {a: 20}}));
-
- jsTest.log('Inserting 6 docs into donor shard, 3 in each chunk....');
- for (var i = 0; i < 3; ++i)
- assert.writeOK(coll.insert({a: i}));
- for (var i = 20; i < 23; ++i)
- assert.writeOK(coll.insert({a: i}));
- st.rs0.awaitReplication();
- assert.eq(6, coll.count());
-
- jsTest.log('Moving 1 (of 2) chunks to recipient shard....');
- assert.commandWorked(admin.runCommand({
- moveChunk: ns,
- find: {a: 30},
- to: recipient.shardName,
- _secondaryThrottle: true,
- writeConcern: {w: 2},
- _waitForDelete: true, // Ensure we don't delete the orphans we're about to insert.
- }));
-
- jsTest.log('Insert 3 orphan documents into donor shard....');
- for (var i = 40; i < 43; ++i)
- assert.writeOK(donorColl.insert({a: i}));
- st.rs0.awaitReplication();
-
- jsTest.log('Checking query results to primaries and secondaries in 3.4 fcv mode');
- // Primary reads should not return orphaned documents.
- let res = coll.runCommand({find: collName, $readPreference: {mode: "primary"}});
- assert.commandWorked(res);
- assert.eq(6, res.cursor.firstBatch.length);
-
- // Secondary reads should return orphaned documents.
- res = coll.runCommand({find: collName, $readPreference: {mode: "secondary"}});
- assert.commandWorked(res);
- assert.eq(9, res.cursor.firstBatch.length);
-
- jsTest.log('Raising feature compatibility to 3.6');
- assert.commandWorked(admin.runCommand({setFeatureCompatibilityVersion: "3.6"}));
-
- jsTest.log('Rechecking query results on primaries and secondaries now that it is 3.6 fcv mode');
- // Primary reads should default to 'local' read concern level.
- res = coll.runCommand({find: collName, $readPreference: {mode: "primary"}});
- assert.commandWorked(res);
- assert.eq(6, res.cursor.firstBatch.length);
-
- // Primary reads should return orphaned documents when read concern level 'available' is
- // specified.
- res = coll.runCommand(
- {find: collName, $readPreference: {mode: "primary"}, readConcern: {"level": "available"}});
- assert.commandWorked(res);
- assert.eq(9, res.cursor.firstBatch.length);
-
- // Secondary reads should no longer return orphaned documents with read concern level 'local'.
- res = coll.runCommand(
- {find: collName, $readPreference: {mode: "secondary"}, readConcern: {"level": "local"}});
- assert.commandWorked(res);
- assert.eq(6, res.cursor.firstBatch.length);
-
- // Secondary reads should default to read concern level 'available' and return orphans.
- res = coll.runCommand({find: collName, $readPreference: {mode: "secondary"}});
- assert.commandWorked(res);
- assert.eq(9, res.cursor.firstBatch.length);
-
- st.stop();
-})();