summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Taskov <alex.taskov@mongodb.com>2020-04-03 10:42:41 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-04-03 14:55:40 +0000
commit6540acb12aeeb2327f81d2c6ef3b73626554b13f (patch)
treee79dc070b1a2e68d035bbd77ea669af7ca6872b0
parent0decca93cfd99752e7918e3ca8ecf6255d6069f2 (diff)
downloadmongo-6540acb12aeeb2327f81d2c6ef3b73626554b13f.tar.gz
SERVER-45993 Remove code in migration tests that caters to 4.2 binaries
-rw-r--r--jstests/sharding/cleanup_orphaned.js3
-rw-r--r--jstests/sharding/cleanup_orphaned_basic.js3
-rw-r--r--jstests/sharding/cleanup_orphaned_cmd_during_movechunk.js3
-rw-r--r--jstests/sharding/cleanup_orphaned_cmd_during_movechunk_hashed.js2
-rw-r--r--jstests/sharding/cleanup_orphaned_cmd_hashed.js2
-rw-r--r--jstests/sharding/cleanup_orphaned_cmd_prereload.js2
-rw-r--r--jstests/sharding/cleanup_orphaned_compound.js2
-rw-r--r--jstests/sharding/cleanup_orphaned_with_resumable_range_deleter.js3
-rw-r--r--jstests/sharding/migration_coordinator_abort_failover.js2
-rw-r--r--jstests/sharding/migration_coordinator_basic.js3
-rw-r--r--jstests/sharding/migration_coordinator_commit_failover.js2
-rw-r--r--jstests/sharding/migration_coordinator_killop_in_critical_section.js4
-rw-r--r--jstests/sharding/migration_coordinator_shutdown_in_critical_section.js4
-rw-r--r--jstests/sharding/migration_fails_if_exists_in_rangedeletions.js1
-rw-r--r--jstests/sharding/migration_ignore_interrupts_3.js3
-rw-r--r--jstests/sharding/migration_ignore_interrupts_4.js3
-rw-r--r--jstests/sharding/migration_retries_on_write_conflict_exceptions.js2
-rw-r--r--jstests/sharding/migration_sets_fromMigrate_flag.js1
-rw-r--r--jstests/sharding/migration_waits_for_majority_commit.js43
-rw-r--r--jstests/sharding/move_chunk_respects_maxtimems.js2
-rw-r--r--jstests/sharding/orphans_are_removed_after_failover.js2
-rw-r--r--jstests/sharding/range_deleter_interacts_correctly_with_refine_shard_key.js2
-rw-r--r--jstests/sharding/range_deleter_server_status.js2
-rw-r--r--jstests/sharding/resubmit_rangedeletions_on_stepup.js1
-rw-r--r--jstests/sharding/updates_to_rangedeletions_collection_trigger_range_deletions.js1
25 files changed, 19 insertions, 79 deletions
diff --git a/jstests/sharding/cleanup_orphaned.js b/jstests/sharding/cleanup_orphaned.js
index 6359d4be110..7e9b70f0b47 100644
--- a/jstests/sharding/cleanup_orphaned.js
+++ b/jstests/sharding/cleanup_orphaned.js
@@ -1,9 +1,6 @@
//
// Shards data from the key range, then inserts orphan documents, runs cleanupOrphans
// and makes sure that orphans are removed. Uses an _id as a shard key.
-//
-// requires_fcv_44 because the 'disableResumableRangeDeleter' parameter was introduced in v4.4.
-// @tags: [requires_fcv_44]
load('./jstests/libs/cleanup_orphaned_util.js');
diff --git a/jstests/sharding/cleanup_orphaned_basic.js b/jstests/sharding/cleanup_orphaned_basic.js
index a41ae1f47c6..8aa9109c633 100644
--- a/jstests/sharding/cleanup_orphaned_basic.js
+++ b/jstests/sharding/cleanup_orphaned_basic.js
@@ -2,9 +2,8 @@
// Basic tests of cleanupOrphaned. Validates that non allowed uses of the cleanupOrphaned
// command fail.
//
-// requires_fcv_44 because the 'disableResumableRangeDeleter' parameter was introduced in v4.4.
// requires_persistence because it restarts a shard.
-// @tags: [requires_fcv_44, requires_persistence]
+// @tags: [requires_persistence]
(function() {
"use strict";
diff --git a/jstests/sharding/cleanup_orphaned_cmd_during_movechunk.js b/jstests/sharding/cleanup_orphaned_cmd_during_movechunk.js
index 6f3ae3ba8ac..605ebd4efe3 100644
--- a/jstests/sharding/cleanup_orphaned_cmd_during_movechunk.js
+++ b/jstests/sharding/cleanup_orphaned_cmd_during_movechunk.js
@@ -2,9 +2,6 @@
// Tests cleanupOrphaned concurrent with moveChunk.
// Inserts orphan documents to the donor and recipient shards during the moveChunk and
// verifies that cleanupOrphaned removes orphans.
-//
-// requires_fcv_44 because the 'disableResumableRangeDeleter' parameter was introduced in v4.4.
-// @tags: [requires_fcv_44]
load('./jstests/libs/chunk_manipulation_util.js');
load('./jstests/libs/cleanup_orphaned_util.js');
diff --git a/jstests/sharding/cleanup_orphaned_cmd_during_movechunk_hashed.js b/jstests/sharding/cleanup_orphaned_cmd_during_movechunk_hashed.js
index 2ab59df4a54..687f4566ab8 100644
--- a/jstests/sharding/cleanup_orphaned_cmd_during_movechunk_hashed.js
+++ b/jstests/sharding/cleanup_orphaned_cmd_during_movechunk_hashed.js
@@ -4,8 +4,6 @@
// Inserts orphan documents to the donor and recipient shards during the moveChunk and
// verifies that cleanupOrphaned removes orphans.
//
-// requires_fcv_44 because the 'disableResumableRangeDeleter' parameter was introduced in v4.4.
-// @tags: [requires_fcv_44]
load('./jstests/libs/chunk_manipulation_util.js');
load('./jstests/libs/cleanup_orphaned_util.js');
diff --git a/jstests/sharding/cleanup_orphaned_cmd_hashed.js b/jstests/sharding/cleanup_orphaned_cmd_hashed.js
index 5efa4ad6c40..11ab4c1d8bc 100644
--- a/jstests/sharding/cleanup_orphaned_cmd_hashed.js
+++ b/jstests/sharding/cleanup_orphaned_cmd_hashed.js
@@ -1,8 +1,6 @@
//
// Tests cleanup of orphaned data in hashed sharded coll via the orphaned data cleanup command
//
-// requires_fcv_44 because the 'disableResumableRangeDeleter' parameter was introduced in v4.4.
-// @tags: [requires_fcv_44]
(function() {
"use strict";
diff --git a/jstests/sharding/cleanup_orphaned_cmd_prereload.js b/jstests/sharding/cleanup_orphaned_cmd_prereload.js
index 33aa8bca9c8..548e79bd275 100644
--- a/jstests/sharding/cleanup_orphaned_cmd_prereload.js
+++ b/jstests/sharding/cleanup_orphaned_cmd_prereload.js
@@ -1,8 +1,6 @@
//
// Tests failed cleanup of orphaned data when we have pending chunks
//
-// requires_fcv_44 because the 'disableResumableRangeDeleter' parameter was introduced in v4.4.
-// @tags: [requires_fcv_44]
var st = new ShardingTest(
{shards: 2, shardOptions: {setParameter: {"disableResumableRangeDeleter": true}}});
diff --git a/jstests/sharding/cleanup_orphaned_compound.js b/jstests/sharding/cleanup_orphaned_compound.js
index 931c08e4387..ebf7163c77d 100644
--- a/jstests/sharding/cleanup_orphaned_compound.js
+++ b/jstests/sharding/cleanup_orphaned_compound.js
@@ -2,8 +2,6 @@
// Shards data from the key range, then inserts orphan documents, runs cleanupOrphans
// and makes sure that orphans are removed. Uses a compound shard key.
//
-// requires_fcv_44 because the 'disableResumableRangeDeleter' parameter was introduced in v4.4.
-// @tags: [requires_fcv_44]
load('./jstests/libs/cleanup_orphaned_util.js');
diff --git a/jstests/sharding/cleanup_orphaned_with_resumable_range_deleter.js b/jstests/sharding/cleanup_orphaned_with_resumable_range_deleter.js
index 97c8b2fe9d0..b9bb49942f8 100644
--- a/jstests/sharding/cleanup_orphaned_with_resumable_range_deleter.js
+++ b/jstests/sharding/cleanup_orphaned_with_resumable_range_deleter.js
@@ -6,9 +6,6 @@
* 2) Waits for all possibly orphaned ranges to be deleted before returning
* 3) Does not return 'stoppedAtKey', to preserve the former API of not returning 'stoppedAtKey'
* once all orphans have been deleted.
- *
- * requires_fcv_44 because it's explicitly testing the FCV 4.4 behavior of cleanupOrphaned.
- * @tags: [requires_fcv_44]
*/
(function() {
diff --git a/jstests/sharding/migration_coordinator_abort_failover.js b/jstests/sharding/migration_coordinator_abort_failover.js
index 8aefde287c5..14aaeddd220 100644
--- a/jstests/sharding/migration_coordinator_abort_failover.js
+++ b/jstests/sharding/migration_coordinator_abort_failover.js
@@ -1,8 +1,6 @@
/**
* Tests that a donor resumes coordinating a migration if it fails over after creating the
* migration coordinator document but before deleting it.
- *
- * @tags: [requires_fcv_44]
*/
// This test induces failovers on shards.
diff --git a/jstests/sharding/migration_coordinator_basic.js b/jstests/sharding/migration_coordinator_basic.js
index 2a75d0a0341..a4125f77f69 100644
--- a/jstests/sharding/migration_coordinator_basic.js
+++ b/jstests/sharding/migration_coordinator_basic.js
@@ -3,9 +3,6 @@
* own and the recipient's config.rangeDeletions, and informs itself and the recipient of the
* migration's outcome by updating or deleting its own and the recipient's config.rangeDeletions
* entries for the migration.
- *
- * This test expects migrations to use the FCV 4.4 protocol.
- * @tags: [requires_fcv_44]
*/
(function() {
diff --git a/jstests/sharding/migration_coordinator_commit_failover.js b/jstests/sharding/migration_coordinator_commit_failover.js
index b3757f43498..be6e7556455 100644
--- a/jstests/sharding/migration_coordinator_commit_failover.js
+++ b/jstests/sharding/migration_coordinator_commit_failover.js
@@ -1,8 +1,6 @@
/**
* Tests that a donor resumes coordinating a migration if it fails over after creating the
* migration coordinator document but before deleting it.
- *
- * @tags: [requires_fcv_44]
*/
// This test induces failovers on shards.
diff --git a/jstests/sharding/migration_coordinator_killop_in_critical_section.js b/jstests/sharding/migration_coordinator_killop_in_critical_section.js
index d70e698d5fb..0565fd13a56 100644
--- a/jstests/sharding/migration_coordinator_killop_in_critical_section.js
+++ b/jstests/sharding/migration_coordinator_killop_in_critical_section.js
@@ -4,10 +4,6 @@
*
* Depends on the checkOrphansAreDeleted hook at the end of ShardingTest to verify that the orphans,
* range deletion tasks, and migration coordinator state are deleted despite the killOps.
- *
- * Marked as multiversion_incompatible because the failpoints used in this test were introduced
- * on v4.4 mongod.
- * @tags: [multiversion_incompatible]
*/
(function() {
diff --git a/jstests/sharding/migration_coordinator_shutdown_in_critical_section.js b/jstests/sharding/migration_coordinator_shutdown_in_critical_section.js
index 51914a4fea6..27ae3c20d7d 100644
--- a/jstests/sharding/migration_coordinator_shutdown_in_critical_section.js
+++ b/jstests/sharding/migration_coordinator_shutdown_in_critical_section.js
@@ -2,10 +2,6 @@
* Shuts down the donor primary at two points in the critical section: while the node is executing
* _configsvrEnsureChunkVersionIsGreaterThan and while the node is forcing a filtering metadata
* refresh.
- *
- * Marked as multiversion_incompatible because the failpoints used in this test were introduced
- * on v4.4 mongod.
- * @tags: [multiversion_incompatible]
*/
(function() {
diff --git a/jstests/sharding/migration_fails_if_exists_in_rangedeletions.js b/jstests/sharding/migration_fails_if_exists_in_rangedeletions.js
index 5c8cdd44bdc..3c4e1856b20 100644
--- a/jstests/sharding/migration_fails_if_exists_in_rangedeletions.js
+++ b/jstests/sharding/migration_fails_if_exists_in_rangedeletions.js
@@ -1,6 +1,5 @@
/*
* Ensures that error is reported when overlappping range is submitted for deletion.
- * @tags: [multiversion_incompatible]
*/
(function() {
diff --git a/jstests/sharding/migration_ignore_interrupts_3.js b/jstests/sharding/migration_ignore_interrupts_3.js
index b289ae48780..4b99fc2b537 100644
--- a/jstests/sharding/migration_ignore_interrupts_3.js
+++ b/jstests/sharding/migration_ignore_interrupts_3.js
@@ -4,9 +4,6 @@
//
// Note: don't use coll1 in this test after a coll1 migration is interrupted -- the distlock isn't
// released promptly when interrupted.
-//
-// Uses the disableResumableRangeDeleter parameter, which was introduced in v4.4.
-// @tags: [requires_fcv_44]
load('./jstests/libs/chunk_manipulation_util.js');
diff --git a/jstests/sharding/migration_ignore_interrupts_4.js b/jstests/sharding/migration_ignore_interrupts_4.js
index c47f9807cd3..d28d809178d 100644
--- a/jstests/sharding/migration_ignore_interrupts_4.js
+++ b/jstests/sharding/migration_ignore_interrupts_4.js
@@ -4,9 +4,6 @@
//
// Note: don't use coll1 in this test after a coll1 migration is interrupted -- the distlock isn't
// released promptly when interrupted.
-//
-// Uses the disableResumableRangeDeleter parameter, which was introduced in v4.4.
-// @tags: [requires_fcv_44]
load('./jstests/libs/chunk_manipulation_util.js');
diff --git a/jstests/sharding/migration_retries_on_write_conflict_exceptions.js b/jstests/sharding/migration_retries_on_write_conflict_exceptions.js
index 92c8941eb10..0dd66c5f660 100644
--- a/jstests/sharding/migration_retries_on_write_conflict_exceptions.js
+++ b/jstests/sharding/migration_retries_on_write_conflict_exceptions.js
@@ -1,7 +1,7 @@
/**
* Tests that WriteConflictException is handled when applying transfer mods during migrations.
- * @tags: [requires_fcv_44]
*/
+
(function() {
'use strict';
diff --git a/jstests/sharding/migration_sets_fromMigrate_flag.js b/jstests/sharding/migration_sets_fromMigrate_flag.js
index 6cdc493d341..78f91705c08 100644
--- a/jstests/sharding/migration_sets_fromMigrate_flag.js
+++ b/jstests/sharding/migration_sets_fromMigrate_flag.js
@@ -12,7 +12,6 @@
// migration and is sent to the recipient via the transfer logs.
// #5 fromMigrate is NOT set on donor shard and IS set on the recipient shard when real
// delete op is done during chunk migration within the chunk range.
-// @tags: [requires_fcv_44]
//
load('./jstests/libs/chunk_manipulation_util.js');
diff --git a/jstests/sharding/migration_waits_for_majority_commit.js b/jstests/sharding/migration_waits_for_majority_commit.js
index 6581a8da592..7f755fc5b04 100644
--- a/jstests/sharding/migration_waits_for_majority_commit.js
+++ b/jstests/sharding/migration_waits_for_majority_commit.js
@@ -52,32 +52,23 @@ assert.commandWorked(
// Allow the migration to begin cloning.
unpauseMigrateAtStep(st.rs1.getPrimary(), 2);
-// The migration should fail to commit without being able to advance the majority commit point.
-if (jsTestOptions().mongosBinVersion == "last-stable") {
- awaitMigration();
-
- assert.commandWorked(
- destinationSec.adminCommand({configureFailPoint: "rsSyncApplyStop", mode: "off"}),
- "failed to enable fail point on secondary");
-} else {
- // In FCV 4.4, check the migration coordinator document, because the moveChunk command itself
- // will hang on trying to remove the recipient's range deletion entry with majority writeConcern
- // until replication is re-enabled on the recipient.
- assert.soon(() => {
- return st.rs0.getPrimary().getDB("config").getCollection("migrationCoordinators").findOne({
- nss: "test.foo",
- "range.min._id": 0,
- "range.max._id": MaxKey,
- decision: "aborted",
- }) != null;
- });
-
- assert.commandWorked(
- destinationSec.adminCommand({configureFailPoint: "rsSyncApplyStop", mode: "off"}),
- "failed to enable fail point on secondary");
-
- awaitMigration();
-}
+// Check the migration coordinator document, because the moveChunk command itself
+// will hang on trying to remove the recipient's range deletion entry with majority writeConcern
+// until replication is re-enabled on the recipient.
+assert.soon(() => {
+ return st.rs0.getPrimary().getDB("config").getCollection("migrationCoordinators").findOne({
+ nss: "test.foo",
+ "range.min._id": 0,
+ "range.max._id": MaxKey,
+ decision: "aborted",
+ }) != null;
+});
+
+assert.commandWorked(
+ destinationSec.adminCommand({configureFailPoint: "rsSyncApplyStop", mode: "off"}),
+ "failed to enable fail point on secondary");
+
+awaitMigration();
st.stop();
MongoRunner.stopMongod(staticMongod);
diff --git a/jstests/sharding/move_chunk_respects_maxtimems.js b/jstests/sharding/move_chunk_respects_maxtimems.js
index 2ece4520f29..c1f331f2437 100644
--- a/jstests/sharding/move_chunk_respects_maxtimems.js
+++ b/jstests/sharding/move_chunk_respects_maxtimems.js
@@ -2,8 +2,6 @@
* Tests that if maxTimeMS is sent with a moveChunk command, the client thread that issued moveChunk
* will be interrupted when maxTimeMS is exceeded, but moveChunk will eventually succeed in the
* background.
- *
- * @tags: [multiversion_incompatible]
*/
(function() {
diff --git a/jstests/sharding/orphans_are_removed_after_failover.js b/jstests/sharding/orphans_are_removed_after_failover.js
index 01c0b9a24d2..5e765f56ec4 100644
--- a/jstests/sharding/orphans_are_removed_after_failover.js
+++ b/jstests/sharding/orphans_are_removed_after_failover.js
@@ -7,8 +7,6 @@
* 4. Cause a step down on Shard A
* 5. Connect directly to the new primary of Shard A and verify that eventually no documents remain
* from the chunk that was migrated away
- *
- * @tags: [requires_fcv_44]
*/
(function() {
diff --git a/jstests/sharding/range_deleter_interacts_correctly_with_refine_shard_key.js b/jstests/sharding/range_deleter_interacts_correctly_with_refine_shard_key.js
index 5c3c22a52c9..74241d79631 100644
--- a/jstests/sharding/range_deleter_interacts_correctly_with_refine_shard_key.js
+++ b/jstests/sharding/range_deleter_interacts_correctly_with_refine_shard_key.js
@@ -1,7 +1,5 @@
/**
* Tests the interaction of the refineCollectionShardKey command with the range deleter.
- *
- * @tags: [requires_fcv_44]
*/
(function() {
diff --git a/jstests/sharding/range_deleter_server_status.js b/jstests/sharding/range_deleter_server_status.js
index c9f49bfdf32..c54808cd340 100644
--- a/jstests/sharding/range_deleter_server_status.js
+++ b/jstests/sharding/range_deleter_server_status.js
@@ -1,8 +1,6 @@
/**
* Basic test to demonstrate that the range deleter section in shardingStatistics is displayed
* correctly.
- *
- * @tags: [requires_fcv_44]
*/
(function() {
"use strict";
diff --git a/jstests/sharding/resubmit_rangedeletions_on_stepup.js b/jstests/sharding/resubmit_rangedeletions_on_stepup.js
index 03f68ae7558..3cded7ef852 100644
--- a/jstests/sharding/resubmit_rangedeletions_on_stepup.js
+++ b/jstests/sharding/resubmit_rangedeletions_on_stepup.js
@@ -1,6 +1,5 @@
/**
* Ensure that orphaned documents are submitted for deletion on step up.
- * @tags: [multiversion_incompatible]
*/
(function() {
diff --git a/jstests/sharding/updates_to_rangedeletions_collection_trigger_range_deletions.js b/jstests/sharding/updates_to_rangedeletions_collection_trigger_range_deletions.js
index 266be4a2174..637c61631dc 100644
--- a/jstests/sharding/updates_to_rangedeletions_collection_trigger_range_deletions.js
+++ b/jstests/sharding/updates_to_rangedeletions_collection_trigger_range_deletions.js
@@ -1,7 +1,6 @@
/**
* Ensure that orphaned documents are deleted when the pending = true field is removed from the
* config.rangeDeletions collection.
- * @tags: [multiversion_incompatible]
*/
(function() {