diff --git a/jstests/multiVersion/genericSetFCVUsage/tenant_migration_donor_abort_on_fcv_change.js b/jstests/multiVersion/genericSetFCVUsage/tenant_migration_donor_abort_on_fcv_change.js index 56067802b1f..8bdc60d980f 100644 --- a/jstests/multiVersion/genericSetFCVUsage/tenant_migration_donor_abort_on_fcv_change.js +++ b/jstests/multiVersion/genericSetFCVUsage/tenant_migration_donor_abort_on_fcv_change.js @@ -14,10 +14,6 @@ load("jstests/replsets/libs/tenant_migration_test.js"); load("jstests/replsets/libs/tenant_migration_util.js"); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName()}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; -} const tenantId = "testTenantId"; const dbName = tenantMigrationTest.tenantDB(tenantId, "testDB"); diff --git a/jstests/multiVersion/genericSetFCVUsage/tenant_migration_donor_recipient_fcv_mismatch.js b/jstests/multiVersion/genericSetFCVUsage/tenant_migration_donor_recipient_fcv_mismatch.js index cad0c7bb913..154d53310d5 100644 --- a/jstests/multiVersion/genericSetFCVUsage/tenant_migration_donor_recipient_fcv_mismatch.js +++ b/jstests/multiVersion/genericSetFCVUsage/tenant_migration_donor_recipient_fcv_mismatch.js @@ -14,10 +14,6 @@ function runTest(downgradeFCV) { load("jstests/replsets/libs/tenant_migration_util.js"); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName()}); - if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; - } const tenantId = "testTenantId"; const dbName = tenantMigrationTest.tenantDB(tenantId, "testDB"); @@ -60,5 +56,8 @@ function runTest(downgradeFCV) { tenantMigrationTest.stop(); } -runFeatureFlagMultiversionTest('featureFlagTenantMigrations', runTest); +runTest(lastContinuousFCV); +if (lastContinuousFCV != lastLTSFCV) { + runTest(lastLTSFCV); +} })(); diff --git a/jstests/multiVersion/genericSetFCVUsage/tenant_migration_donor_recipient_fcv_mismatch_after_failover.js b/jstests/multiVersion/genericSetFCVUsage/tenant_migration_donor_recipient_fcv_mismatch_after_failover.js index 6006118edc2..798aa52f356 100644 --- a/jstests/multiVersion/genericSetFCVUsage/tenant_migration_donor_recipient_fcv_mismatch_after_failover.js +++ b/jstests/multiVersion/genericSetFCVUsage/tenant_migration_donor_recipient_fcv_mismatch_after_failover.js @@ -15,10 +15,6 @@ function runTest(downgradeFCV) { load("jstests/replsets/libs/tenant_migration_util.js"); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName()}); - if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; - } const tenantId = "testTenantId"; const dbName = tenantMigrationTest.tenantDB(tenantId, "testDB"); @@ -69,5 +65,8 @@ function runTest(downgradeFCV) { tenantMigrationTest.stop(); } -runFeatureFlagMultiversionTest('featureFlagTenantMigrations', runTest); +runTest(lastContinuousFCV); +if (lastContinuousFCV != lastLTSFCV) { + runTest(lastLTSFCV); +} })(); diff --git a/jstests/multiVersion/genericSetFCVUsage/tenant_migration_recipient_abort_on_fcv_change.js b/jstests/multiVersion/genericSetFCVUsage/tenant_migration_recipient_abort_on_fcv_change.js index 50c15e74fe5..a5aaff99485 100644 --- a/jstests/multiVersion/genericSetFCVUsage/tenant_migration_recipient_abort_on_fcv_change.js +++ b/jstests/multiVersion/genericSetFCVUsage/tenant_migration_recipient_abort_on_fcv_change.js @@ -14,10 +14,6 @@ load("jstests/replsets/libs/tenant_migration_test.js"); load("jstests/replsets/libs/tenant_migration_util.js"); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName()}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; -} const tenantId = "testTenantId"; const dbName = tenantMigrationTest.tenantDB(tenantId, "testDB"); diff --git a/jstests/multiVersion/genericSetFCVUsage/tenant_migration_save_fcv.js b/jstests/multiVersion/genericSetFCVUsage/tenant_migration_save_fcv.js index a79b9e99ee8..a7881fef8aa 100644 --- a/jstests/multiVersion/genericSetFCVUsage/tenant_migration_save_fcv.js +++ b/jstests/multiVersion/genericSetFCVUsage/tenant_migration_save_fcv.js @@ -22,11 +22,6 @@ function runTest(downgradeFCV) { recipientRst.startSet(); recipientRst.initiate(); - if (!TenantMigrationUtil.isFeatureFlagEnabled(recipientRst.getPrimary())) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - recipientRst.stopSet(); - return; - } const tenantMigrationTest = new TenantMigrationTest({name: jsTestName(), recipientRst: recipientRst}); @@ -77,5 +72,8 @@ function runTest(downgradeFCV) { recipientRst.stopSet(); } -runFeatureFlagMultiversionTest('featureFlagTenantMigrations', runTest); +runTest(lastContinuousFCV); +if (lastContinuousFCV != lastLTSFCV) { + runTest(lastLTSFCV); +} })(); \ No newline at end of file diff --git a/jstests/replsets/libs/tenant_migration_recipient_sync_source.js b/jstests/replsets/libs/tenant_migration_recipient_sync_source.js index 488b8fce70d..843c4b7817f 100644 --- a/jstests/replsets/libs/tenant_migration_recipient_sync_source.js +++ b/jstests/replsets/libs/tenant_migration_recipient_sync_source.js @@ -36,11 +36,7 @@ const setUpMigrationSyncSourceTest = function() { donorRst.initiateWithHighElectionTimeout(); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName(), donorRst}); - if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - donorRst.stopSet(); - return {}; - } + const tenantId = "testTenantId"; const tenantDB = tenantMigrationTest.tenantDB(tenantId, "DB"); const collName = "testColl"; diff --git a/jstests/replsets/libs/tenant_migration_test.js b/jstests/replsets/libs/tenant_migration_test.js index f54a246a9af..32747a1f3f5 100644 --- a/jstests/replsets/libs/tenant_migration_test.js +++ b/jstests/replsets/libs/tenant_migration_test.js @@ -93,32 +93,6 @@ function TenantMigrationTest({ return rst; } - /** - * Returns whether tenant migration commands are supported. - */ - this.isFeatureFlagEnabled = function() { - function supportsTenantMigrations(rst) { - const conn = rst.getPrimary(); - return rst.asCluster(conn, () => { - return assert - .commandWorked( - conn.adminCommand({getParameter: 1, featureFlagTenantMigrations: 1})) - .featureFlagTenantMigrations.value; - }); - } - const retVal = (supportsTenantMigrations(this.getDonorRst()) && - supportsTenantMigrations(this.getRecipientRst())); - if (!retVal) { - jsTestLog("At least one of the donor or recipient replica sets do not support tenant " + - "migration commands. Terminating any replica sets started by the " + - "TenantMigrationTest fixture."); - // Stop any replica sets started by the TenantMigrationTest fixture. - this.stop(); - } - - return retVal; - }; - /** * Runs a tenant migration with the given migration options and waits for the migration to be * committed or aborted. diff --git a/jstests/replsets/libs/tenant_migration_util.js b/jstests/replsets/libs/tenant_migration_util.js index 0b96bb04b7e..9949482ccc7 100644 --- a/jstests/replsets/libs/tenant_migration_util.js +++ b/jstests/replsets/libs/tenant_migration_util.js @@ -12,15 +12,6 @@ var TenantMigrationUtil = (function() { return conn.getCollection(kExternalKeysNs).find({migrationId}).toArray(); } - /** - * Returns whether tenant migration commands are supported. - */ - function isFeatureFlagEnabled(conn) { - return assert - .commandWorked(conn.adminCommand({getParameter: 1, featureFlagTenantMigrations: 1})) - .featureFlagTenantMigrations.value; - } - /** * Returns X509 options for ReplSetTest with the given certificate-key file and CA pem file. */ @@ -472,7 +463,6 @@ var TenantMigrationUtil = (function() { createRstArgs, createRst, runTenantMigrationCommand, - isFeatureFlagEnabled, getCertificateAndPrivateKey, makeX509Options, makeMigrationCertificatesForTest, diff --git a/jstests/replsets/tenant_migration_abort_forget_retry.js b/jstests/replsets/tenant_migration_abort_forget_retry.js index b770e05fbe3..0e0b0b4007a 100644 --- a/jstests/replsets/tenant_migration_abort_forget_retry.js +++ b/jstests/replsets/tenant_migration_abort_forget_retry.js @@ -30,10 +30,6 @@ function makeTenantId() { } const tenantMigrationTest = new TenantMigrationTest({name: jsTestName()}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; -} (() => { const migrationId1 = extractUUIDFromObject(UUID()); diff --git a/jstests/replsets/tenant_migration_aborted_buildindex.js b/jstests/replsets/tenant_migration_aborted_buildindex.js index a6f4907b123..3c4e3268f71 100644 --- a/jstests/replsets/tenant_migration_aborted_buildindex.js +++ b/jstests/replsets/tenant_migration_aborted_buildindex.js @@ -15,10 +15,6 @@ load("jstests/replsets/libs/tenant_migration_test.js"); load("jstests/replsets/libs/tenant_migration_util.js"); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName()}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; -} const kTenantId = "testTenantId"; const kDbName = tenantMigrationTest.tenantDB(kTenantId, "testDB"); diff --git a/jstests/replsets/tenant_migration_blocking_state_timeout.js b/jstests/replsets/tenant_migration_blocking_state_timeout.js index 82148d701f7..d6e1473a632 100644 --- a/jstests/replsets/tenant_migration_blocking_state_timeout.js +++ b/jstests/replsets/tenant_migration_blocking_state_timeout.js @@ -22,10 +22,6 @@ load("jstests/replsets/libs/tenant_migration_util.js"); const kTenantIdPrefix = "testTenantId"; const tenantMigrationTest = new TenantMigrationTest({name: jsTestName()}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; -} function testTimeoutBlockingState() { const donorRst = tenantMigrationTest.getDonorRst(); diff --git a/jstests/replsets/tenant_migration_buildindex.js b/jstests/replsets/tenant_migration_buildindex.js index 37ccd75b105..0f5d9ec9e25 100644 --- a/jstests/replsets/tenant_migration_buildindex.js +++ b/jstests/replsets/tenant_migration_buildindex.js @@ -20,10 +20,6 @@ load("jstests/replsets/libs/tenant_migration_test.js"); load("jstests/replsets/libs/tenant_migration_util.js"); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName()}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; -} const kTenantId = "testTenantId1"; const kUnrelatedTenantId = "testTenantId2"; diff --git a/jstests/replsets/tenant_migration_causal_consistency_commit_optime_before_last_cloning_optime.js b/jstests/replsets/tenant_migration_causal_consistency_commit_optime_before_last_cloning_optime.js index 18070b222bf..ca1aaaade3f 100644 --- a/jstests/replsets/tenant_migration_causal_consistency_commit_optime_before_last_cloning_optime.js +++ b/jstests/replsets/tenant_migration_causal_consistency_commit_optime_before_last_cloning_optime.js @@ -3,7 +3,6 @@ * timestamp than the latest optime associated with cloning on the recipient. * * @tags: [ - * featureFlagTenantMigrations, * incompatible_with_eft, * incompatible_with_macos, * incompatible_with_windows_tls, diff --git a/jstests/replsets/tenant_migration_cloner_stats.js b/jstests/replsets/tenant_migration_cloner_stats.js index e1760ee9bea..9bd91ad181b 100644 --- a/jstests/replsets/tenant_migration_cloner_stats.js +++ b/jstests/replsets/tenant_migration_cloner_stats.js @@ -22,11 +22,6 @@ load("jstests/replsets/libs/tenant_migration_util.js"); const tenantMigrationTest = new TenantMigrationTest( {name: jsTestName(), sharedOptions: {setParameter: {collectionClonerBatchSize: 10}}}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; -} - const kMigrationId = UUID(); const kTenantId = 'testTenantId'; const kReadPreference = { diff --git a/jstests/replsets/tenant_migration_cloner_stats_with_failover.js b/jstests/replsets/tenant_migration_cloner_stats_with_failover.js index de3ff0d7423..6b7235ae54d 100644 --- a/jstests/replsets/tenant_migration_cloner_stats_with_failover.js +++ b/jstests/replsets/tenant_migration_cloner_stats_with_failover.js @@ -30,11 +30,6 @@ load("jstests/replsets/libs/tenant_migration_util.js"); const tenantMigrationTest = new TenantMigrationTest( {name: jsTestName(), sharedOptions: {setParameter: {collectionClonerBatchSize: 10}}}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; -} - const kMigrationId = UUID(); const kTenantId = 'testTenantId'; const kReadPreference = { diff --git a/jstests/replsets/tenant_migration_clones_system_views.js b/jstests/replsets/tenant_migration_clones_system_views.js index fc89f56bd2f..f663efcfd78 100644 --- a/jstests/replsets/tenant_migration_clones_system_views.js +++ b/jstests/replsets/tenant_migration_clones_system_views.js @@ -18,11 +18,6 @@ load("jstests/libs/uuid_util.js"); load("jstests/replsets/libs/tenant_migration_test.js"); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName()}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - tenantMigrationTest.stop(); - return; -} const donorRst = tenantMigrationTest.getDonorRst(); const donorPrimary = tenantMigrationTest.getDonorPrimary(); diff --git a/jstests/replsets/tenant_migration_cloning_uses_read_concern_majority.js b/jstests/replsets/tenant_migration_cloning_uses_read_concern_majority.js index 88bc6238c30..76805f999c8 100644 --- a/jstests/replsets/tenant_migration_cloning_uses_read_concern_majority.js +++ b/jstests/replsets/tenant_migration_cloning_uses_read_concern_majority.js @@ -21,10 +21,6 @@ load("jstests/replsets/libs/tenant_migration_test.js"); load("jstests/replsets/libs/tenant_migration_util.js"); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName()}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; -} const tenantId = "testTenantId"; const dbName = tenantMigrationTest.tenantDB(tenantId, "testDB"); diff --git a/jstests/replsets/tenant_migration_cluster_time_keys_cloning.js b/jstests/replsets/tenant_migration_cluster_time_keys_cloning.js index 1b271cb0c9c..c6b51595df1 100644 --- a/jstests/replsets/tenant_migration_cluster_time_keys_cloning.js +++ b/jstests/replsets/tenant_migration_cluster_time_keys_cloning.js @@ -72,11 +72,6 @@ const migrationX509Options = TenantMigrationUtil.makeX509OptionsForTest(); jsTest.log("Test that the donor and recipient correctly copy each other's cluster time keys " + "when there is no failover."); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName()}); - if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - tenantMigrationTest.stop(); - return; - } const migrationId = UUID(); const migrationOpts = { @@ -109,12 +104,6 @@ const migrationX509Options = TenantMigrationUtil.makeX509OptionsForTest(); recipientRst.initiate(); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName(), recipientRst}); - if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - recipientRst.stopSet(); - tenantMigrationTest.stop(); - return; - } const migrationId = UUID(); const migrationOpts = { @@ -142,12 +131,6 @@ const migrationX509Options = TenantMigrationUtil.makeX509OptionsForTest(); donorRst.initiate(); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName(), donorRst}); - if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - donorRst.stopSet(); - tenantMigrationTest.stop(); - return; - } let donorPrimary = donorRst.getPrimary(); const fp = @@ -188,12 +171,6 @@ const migrationX509Options = TenantMigrationUtil.makeX509OptionsForTest(); recipientRst.initiate(); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName(), recipientRst}); - if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - recipientRst.stopSet(); - tenantMigrationTest.stop(); - return; - } const recipientPrimary = recipientRst.getPrimary(); const fp = configureFailPoint(recipientPrimary, @@ -238,12 +215,6 @@ const migrationX509Options = TenantMigrationUtil.makeX509OptionsForTest(); donorRst.initiate(); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName(), donorRst}); - if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - donorRst.stopSet(); - tenantMigrationTest.stop(); - return; - } function runTest(tenantId, withFailover) { const migrationId = UUID(); diff --git a/jstests/replsets/tenant_migration_collection_ttl.js b/jstests/replsets/tenant_migration_collection_ttl.js index f033d57ab4e..78c475d659d 100644 --- a/jstests/replsets/tenant_migration_collection_ttl.js +++ b/jstests/replsets/tenant_migration_collection_ttl.js @@ -34,10 +34,6 @@ const garbageCollectionOpts = { const tenantMigrationTest = new TenantMigrationTest( {name: jsTestName(), sharedOptions: {setParameter: garbageCollectionOpts}}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; -} const collName = "testColl"; diff --git a/jstests/replsets/tenant_migration_commit_transaction_retry.js b/jstests/replsets/tenant_migration_commit_transaction_retry.js index 3db8433da76..e07c12bb6ff 100644 --- a/jstests/replsets/tenant_migration_commit_transaction_retry.js +++ b/jstests/replsets/tenant_migration_commit_transaction_retry.js @@ -29,10 +29,6 @@ const kGarbageCollectionParams = { const tenantMigrationTest = new TenantMigrationTest( {name: jsTestName(), sharedOptions: {nodes: 1, setParameter: kGarbageCollectionParams}}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; -} const kTenantId = "testTenantId"; const kDbName = tenantMigrationTest.tenantDB(kTenantId, "testDB"); diff --git a/jstests/replsets/tenant_migration_concurrent_bulk_writes.js b/jstests/replsets/tenant_migration_concurrent_bulk_writes.js index f8d56af7dd6..8ab8f6b56b5 100644 --- a/jstests/replsets/tenant_migration_concurrent_bulk_writes.js +++ b/jstests/replsets/tenant_migration_concurrent_bulk_writes.js @@ -71,12 +71,6 @@ recipientRst.initiate(); const kRecipientConnString = recipientRst.getURL(); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName(), donorRst, recipientRst}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - donorRst.stopSet(); - recipientRst.stopSet(); - return; -} function bulkInsertDocsOrdered(primaryHost, dbName, collName, numDocs) { const primary = new Mongo(primaryHost); diff --git a/jstests/replsets/tenant_migration_concurrent_migrations.js b/jstests/replsets/tenant_migration_concurrent_migrations.js index 305a878c829..2996a24155d 100644 --- a/jstests/replsets/tenant_migration_concurrent_migrations.js +++ b/jstests/replsets/tenant_migration_concurrent_migrations.js @@ -46,10 +46,6 @@ const kTenantIdPrefix = "testTenantId"; // Test concurrent outgoing migrations to different recipients. (() => { const tenantMigrationTest0 = new TenantMigrationTest({donorRst: rst0, recipientRst: rst1}); - if (!tenantMigrationTest0.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; - } const tenantMigrationTest1 = new TenantMigrationTest({donorRst: rst0, recipientRst: rst2}); const tenantId0 = `${kTenantIdPrefix}-ConcurrentOutgoingMigrationsToDifferentRecipient0`; const tenantId1 = `${kTenantIdPrefix}-ConcurrentOutgoingMigrationsToDifferentRecipient1`; @@ -97,10 +93,6 @@ const kTenantIdPrefix = "testTenantId"; // Test concurrent incoming migrations from different donors. (() => { const tenantMigrationTest0 = new TenantMigrationTest({donorRst: rst0, recipientRst: rst2}); - if (!tenantMigrationTest0.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; - } const tenantMigrationTest1 = new TenantMigrationTest({donorRst: rst1, recipientRst: rst2}); const tenantId0 = `${kTenantIdPrefix}-ConcurrentIncomingMigrations0`; const tenantId1 = `${kTenantIdPrefix}-ConcurrentIncomingMigrations1`; @@ -141,10 +133,6 @@ const kTenantIdPrefix = "testTenantId"; // migration to that recipient completes. (() => { const tenantMigrationTest0 = new TenantMigrationTest({donorRst: rst0, recipientRst: rst1}); - if (!tenantMigrationTest0.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; - } const tenantMigrationTest1 = new TenantMigrationTest({donorRst: rst0, recipientRst: rst1}); const tenantId0 = `${kTenantIdPrefix}-ConcurrentOutgoingMigrationsToSameRecipient0`; diff --git a/jstests/replsets/tenant_migration_concurrent_migrations_recipient.js b/jstests/replsets/tenant_migration_concurrent_migrations_recipient.js index b0e6c1198fb..ef6e02e5b83 100644 --- a/jstests/replsets/tenant_migration_concurrent_migrations_recipient.js +++ b/jstests/replsets/tenant_migration_concurrent_migrations_recipient.js @@ -22,10 +22,6 @@ TestData.logComponentVerbosity = { accessControl: {verbosity: 3} }; const tenantMigrationTest = new TenantMigrationTest({name: jsTestName()}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; -} const recipientPrimary = tenantMigrationTest.getRecipientPrimary(); diff --git a/jstests/replsets/tenant_migration_concurrent_migrations_stress_test.js b/jstests/replsets/tenant_migration_concurrent_migrations_stress_test.js index 580f3baafc9..f5abadc021e 100644 --- a/jstests/replsets/tenant_migration_concurrent_migrations_stress_test.js +++ b/jstests/replsets/tenant_migration_concurrent_migrations_stress_test.js @@ -38,10 +38,6 @@ const setParameterOpts = { }; const tenantMigrationTest = new TenantMigrationTest({name: jsTestName(), sharedOptions: {setParameter: setParameterOpts}}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; -} const donorPrimary = tenantMigrationTest.getDonorPrimary(); const recipientPrimary = tenantMigrationTest.getRecipientPrimary(); diff --git a/jstests/replsets/tenant_migration_concurrent_reads_on_donor.js b/jstests/replsets/tenant_migration_concurrent_reads_on_donor.js index e876a7e390c..cb4dd6f4da1 100644 --- a/jstests/replsets/tenant_migration_concurrent_reads_on_donor.js +++ b/jstests/replsets/tenant_migration_concurrent_reads_on_donor.js @@ -26,10 +26,6 @@ load("jstests/replsets/libs/tenant_migration_test.js"); load("jstests/replsets/libs/tenant_migration_util.js"); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName()}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; -} const kCollName = "testColl"; const kTenantDefinedDbName = "0"; diff --git a/jstests/replsets/tenant_migration_concurrent_reads_on_recipient.js b/jstests/replsets/tenant_migration_concurrent_reads_on_recipient.js index 0b2af0177a5..ea6fb5de44e 100644 --- a/jstests/replsets/tenant_migration_concurrent_reads_on_recipient.js +++ b/jstests/replsets/tenant_migration_concurrent_reads_on_recipient.js @@ -28,10 +28,6 @@ load("jstests/replsets/libs/tenant_migration_util.js"); load("jstests/replsets/rslib.js"); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName()}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; -} const kCollName = "testColl"; const kTenantDefinedDbName = "0"; diff --git a/jstests/replsets/tenant_migration_concurrent_reconfig.js b/jstests/replsets/tenant_migration_concurrent_reconfig.js index 0cd4c37c643..ffc49da2ee5 100644 --- a/jstests/replsets/tenant_migration_concurrent_reconfig.js +++ b/jstests/replsets/tenant_migration_concurrent_reconfig.js @@ -20,10 +20,6 @@ load("jstests/replsets/libs/tenant_migration_util.js"); function runTest({failPoint, shouldFail = false}) { const tenantMigrationTest = new TenantMigrationTest({name: jsTestName()}); - if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; - } const tenantId = "testTenantId"; const dbName = tenantMigrationTest.tenantDB(tenantId, "testDB"); diff --git a/jstests/replsets/tenant_migration_concurrent_state_doc_removal_and_stepdown.js b/jstests/replsets/tenant_migration_concurrent_state_doc_removal_and_stepdown.js index f4862fc5120..4985b35ea32 100644 --- a/jstests/replsets/tenant_migration_concurrent_state_doc_removal_and_stepdown.js +++ b/jstests/replsets/tenant_migration_concurrent_state_doc_removal_and_stepdown.js @@ -30,10 +30,6 @@ const tenantMigrationTest = new TenantMigrationTest({ }, initiateRstWithHighElectionTimeout: false }); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; -} const kTenantId = "testTenantId"; diff --git a/jstests/replsets/tenant_migration_concurrent_writes_on_donor.js b/jstests/replsets/tenant_migration_concurrent_writes_on_donor.js index 29e02466b3a..ac22f0581fb 100644 --- a/jstests/replsets/tenant_migration_concurrent_writes_on_donor.js +++ b/jstests/replsets/tenant_migration_concurrent_writes_on_donor.js @@ -34,10 +34,7 @@ const tenantMigrationTest = new TenantMigrationTest({ {'failpoint.tenantMigrationDonorAllowsNonTimestampedReads': tojson({mode: 'alwaysOn'})} } }); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; -} + const donorRst = tenantMigrationTest.getDonorRst(); const primary = donorRst.getPrimary(); diff --git a/jstests/replsets/tenant_migration_concurrent_writes_on_recipient.js b/jstests/replsets/tenant_migration_concurrent_writes_on_recipient.js index fa34814ec67..87627d50481 100644 --- a/jstests/replsets/tenant_migration_concurrent_writes_on_recipient.js +++ b/jstests/replsets/tenant_migration_concurrent_writes_on_recipient.js @@ -21,10 +21,6 @@ load("jstests/replsets/libs/tenant_migration_test.js"); load("jstests/replsets/libs/tenant_migration_util.js"); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName()}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; -} const donorRst = tenantMigrationTest.getDonorRst(); const donorPrimary = donorRst.getPrimary(); diff --git a/jstests/replsets/tenant_migration_conflicting_donor_start_migration_cmds.js b/jstests/replsets/tenant_migration_conflicting_donor_start_migration_cmds.js index 95fccb8e806..1d8c9717c77 100644 --- a/jstests/replsets/tenant_migration_conflicting_donor_start_migration_cmds.js +++ b/jstests/replsets/tenant_migration_conflicting_donor_start_migration_cmds.js @@ -61,11 +61,6 @@ donorRst.startSet(); donorRst.initiate(); const tenantMigrationTest0 = new TenantMigrationTest({name: jsTestName(), donorRst}); -if (!tenantMigrationTest0.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - donorRst.stopSet(); - return; -} const donorPrimary = donorRst.getPrimary(); const recipientPrimary = tenantMigrationTest0.getRecipientPrimary(); diff --git a/jstests/replsets/tenant_migration_conflicting_recipient_sync_data_cmds.js b/jstests/replsets/tenant_migration_conflicting_recipient_sync_data_cmds.js index 209891ea735..6989a35ff99 100644 --- a/jstests/replsets/tenant_migration_conflicting_recipient_sync_data_cmds.js +++ b/jstests/replsets/tenant_migration_conflicting_recipient_sync_data_cmds.js @@ -21,12 +21,6 @@ var rst = new ReplSetTest({nodes: 1, nodeOptions: TenantMigrationUtil.makeX509OptionsForTest().donor}); rst.startSet(); rst.initiate(); -if (!TenantMigrationUtil.isFeatureFlagEnabled(rst.getPrimary())) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - rst.stopSet(); - return; -} - const primary = rst.getPrimary(); const configDB = primary.getDB("config"); const configRecipientsColl = configDB["tenantMigrationRecipients"]; diff --git a/jstests/replsets/tenant_migration_donor_abort_state_transition.js b/jstests/replsets/tenant_migration_donor_abort_state_transition.js index dfcae457320..491a3269c94 100644 --- a/jstests/replsets/tenant_migration_donor_abort_state_transition.js +++ b/jstests/replsets/tenant_migration_donor_abort_state_transition.js @@ -21,10 +21,6 @@ load("jstests/replsets/libs/tenant_migration_util.js"); const kTenantIdPrefix = "testTenantId"; const tenantMigrationTest = new TenantMigrationTest({name: jsTestName()}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; -} /** * Starts a migration and forces the write to insert the donor's state doc to abort on the first few diff --git a/jstests/replsets/tenant_migration_donor_current_op.js b/jstests/replsets/tenant_migration_donor_current_op.js index d7d580fc026..ec916dca78b 100644 --- a/jstests/replsets/tenant_migration_donor_current_op.js +++ b/jstests/replsets/tenant_migration_donor_current_op.js @@ -37,10 +37,6 @@ const kReadPreference = { (() => { jsTestLog("Testing currentOp output for migration in data sync state"); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName()}); - if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; - } const donorPrimary = tenantMigrationTest.getDonorPrimary(); @@ -76,10 +72,6 @@ const kReadPreference = { (() => { jsTestLog("Testing currentOp output for migration in data sync state"); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName()}); - if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; - } const donorPrimary = tenantMigrationTest.getDonorPrimary(); @@ -115,10 +107,7 @@ const kReadPreference = { (() => { jsTestLog("Testing currentOp output for migration in blocking state"); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName()}); - if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; - } + const donorPrimary = tenantMigrationTest.getDonorPrimary(); const migrationId = UUID(); @@ -154,10 +143,7 @@ const kReadPreference = { (() => { jsTestLog("Testing currentOp output for aborted migration"); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName()}); - if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; - } + const donorPrimary = tenantMigrationTest.getDonorPrimary(); const migrationId = UUID(); @@ -196,10 +182,7 @@ const kReadPreference = { (() => { jsTestLog("Testing currentOp output for committed migration"); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName()}); - if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; - } + const donorPrimary = tenantMigrationTest.getDonorPrimary(); const migrationId = UUID(); diff --git a/jstests/replsets/tenant_migration_donor_initial_sync_recovery.js b/jstests/replsets/tenant_migration_donor_initial_sync_recovery.js index cc2207ca547..41da012fb50 100644 --- a/jstests/replsets/tenant_migration_donor_initial_sync_recovery.js +++ b/jstests/replsets/tenant_migration_donor_initial_sync_recovery.js @@ -23,10 +23,6 @@ load("jstests/libs/write_concern_util.js"); load("jstests/replsets/libs/tenant_migration_test.js"); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName()}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; -} const kMaxSleepTimeMS = 1000; const kTenantId = 'testTenantId'; diff --git a/jstests/replsets/tenant_migration_donor_interrupt_on_stepdown_and_shutdown.js b/jstests/replsets/tenant_migration_donor_interrupt_on_stepdown_and_shutdown.js index db1039295ae..d891b6e94ea 100644 --- a/jstests/replsets/tenant_migration_donor_interrupt_on_stepdown_and_shutdown.js +++ b/jstests/replsets/tenant_migration_donor_interrupt_on_stepdown_and_shutdown.js @@ -35,10 +35,6 @@ const kMigrationFpNames = [ */ function testDonorStartMigrationInterrupt(interruptFunc, verifyCmdResponseFunc) { const tenantMigrationTest = new TenantMigrationTest({name: jsTestName()}); - if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; - } const donorRst = tenantMigrationTest.getDonorRst(); const donorPrimary = tenantMigrationTest.getDonorPrimary(); @@ -74,10 +70,6 @@ function testDonorStartMigrationInterrupt(interruptFunc, verifyCmdResponseFunc) */ function testDonorForgetMigrationInterrupt(interruptFunc, verifyCmdResponseFunc) { const tenantMigrationTest = new TenantMigrationTest({name: jsTestName()}); - if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; - } const donorRst = tenantMigrationTest.getDonorRst(); const donorPrimary = tenantMigrationTest.getDonorPrimary(); @@ -118,10 +110,6 @@ function testDonorForgetMigrationInterrupt(interruptFunc, verifyCmdResponseFunc) */ function testDonorAbortMigrationInterrupt(interruptFunc, verifyCmdResponseFunc, fpName) { const tenantMigrationTest = new TenantMigrationTest({name: jsTestName()}); - if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; - } const donorRst = tenantMigrationTest.getDonorRst(); const donorPrimary = tenantMigrationTest.getDonorPrimary(); diff --git a/jstests/replsets/tenant_migration_donor_kill_op_retry.js b/jstests/replsets/tenant_migration_donor_kill_op_retry.js index c64e63fead5..bbcbfe8b049 100644 --- a/jstests/replsets/tenant_migration_donor_kill_op_retry.js +++ b/jstests/replsets/tenant_migration_donor_kill_op_retry.js @@ -39,10 +39,6 @@ function makeTenantId() { } const tenantMigrationTest = new TenantMigrationTest({name: jsTestName()}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; -} { // This section tests behavior in the middle of a tenant migration. diff --git a/jstests/replsets/tenant_migration_donor_resume_on_stepup_and_restart.js b/jstests/replsets/tenant_migration_donor_resume_on_stepup_and_restart.js index 5536b1b0927..7decac8c310 100644 --- a/jstests/replsets/tenant_migration_donor_resume_on_stepup_and_restart.js +++ b/jstests/replsets/tenant_migration_donor_resume_on_stepup_and_restart.js @@ -49,11 +49,7 @@ function testDonorStartMigrationInterrupt(interruptFunc, donorRestarted) { donorRst.initiate(); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName(), donorRst}); - if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - donorRst.stopSet(); - return; - } + let donorPrimary = tenantMigrationTest.getDonorPrimary(); const recipientPrimary = tenantMigrationTest.getRecipientPrimary(); @@ -141,12 +137,7 @@ function testDonorForgetMigrationInterrupt(interruptFunc) { const tenantMigrationTest = new TenantMigrationTest({name: jsTestName(), donorRst, recipientRst}); - if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - donorRst.stopSet(); - recipientRst.stopSet(); - return; - } + const donorPrimary = tenantMigrationTest.getDonorPrimary(); const migrationId = UUID(); @@ -221,12 +212,6 @@ function testDonorAbortMigrationInterrupt(interruptFunc, fpName, isShutdown = fa const tenantMigrationTest = new TenantMigrationTest({name: jsTestName(), donorRst, recipientRst}); - if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - donorRst.stopSet(); - recipientRst.stopSet(); - return; - } const migrationId = UUID(); const migrationOpts = { @@ -298,11 +283,6 @@ function testStateDocPersistenceOnFailover(interruptFunc, fpName, isShutdown = f donorRst.initiate(); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName(), donorRst}); - if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - donorRst.stopSet(); - return; - } const migrationId = UUID(); const migrationOpts = { diff --git a/jstests/replsets/tenant_migration_donor_retry.js b/jstests/replsets/tenant_migration_donor_retry.js index 861a3ded07e..902005cdd38 100644 --- a/jstests/replsets/tenant_migration_donor_retry.js +++ b/jstests/replsets/tenant_migration_donor_retry.js @@ -46,12 +46,6 @@ const tenantMigrationTest = new TenantMigrationTest( const donorPrimary = tenantMigrationTest.getDonorPrimary(); const recipientPrimary = tenantMigrationTest.getRecipientPrimary(); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - donorRst.stopSet(); - return; -} - function makeTenantId() { return kTenantIdPrefix + testNum++; } diff --git a/jstests/replsets/tenant_migration_donor_rollback_during_cloning.js b/jstests/replsets/tenant_migration_donor_rollback_during_cloning.js index 31ea505c6d5..2d9eee95ed2 100644 --- a/jstests/replsets/tenant_migration_donor_rollback_during_cloning.js +++ b/jstests/replsets/tenant_migration_donor_rollback_during_cloning.js @@ -29,12 +29,6 @@ const recipientRst = recipientRst.startSet(); recipientRst.initiateWithHighElectionTimeout(); -if (!TenantMigrationUtil.isFeatureFlagEnabled(recipientRst.getPrimary())) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - recipientRst.stopSet(); - return; -} - // This function does the following: // 1. Runs the setup function, which typically involves loading the donor RST with some data. // 2. Configures the failpoints passed in to pause. These failpoints usually mark the steps right diff --git a/jstests/replsets/tenant_migration_donor_rollback_recovery.js b/jstests/replsets/tenant_migration_donor_rollback_recovery.js index 159d842302d..67c9f651897 100644 --- a/jstests/replsets/tenant_migration_donor_rollback_recovery.js +++ b/jstests/replsets/tenant_migration_donor_rollback_recovery.js @@ -42,11 +42,6 @@ const recipientRst = new ReplSetTest({ }); recipientRst.startSet(); recipientRst.initiate(); -if (!TenantMigrationUtil.isFeatureFlagEnabled(recipientRst.getPrimary())) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - recipientRst.stopSet(); - return; -} function makeMigrationOpts(migrationId, tenantId) { return { diff --git a/jstests/replsets/tenant_migration_donor_shutdown_while_blocking_reads.js b/jstests/replsets/tenant_migration_donor_shutdown_while_blocking_reads.js index 05e29765b86..f5bf025a497 100644 --- a/jstests/replsets/tenant_migration_donor_shutdown_while_blocking_reads.js +++ b/jstests/replsets/tenant_migration_donor_shutdown_while_blocking_reads.js @@ -21,10 +21,6 @@ load("jstests/replsets/libs/tenant_migration_test.js"); load("jstests/replsets/libs/tenant_migration_util.js"); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName()}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; -} const kTenantId = "testTenantId"; const kDbName = kTenantId + "_testDb"; diff --git a/jstests/replsets/tenant_migration_donor_startup_recovery.js b/jstests/replsets/tenant_migration_donor_startup_recovery.js index 456c98a9976..4fdef41a64d 100644 --- a/jstests/replsets/tenant_migration_donor_startup_recovery.js +++ b/jstests/replsets/tenant_migration_donor_startup_recovery.js @@ -33,11 +33,6 @@ donorRst.startSet(); donorRst.initiate(); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName(), donorRst}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - donorRst.stopSet(); - return; -} const kMaxSleepTimeMS = 1000; const kTenantId = 'testTenantId'; diff --git a/jstests/replsets/tenant_migration_donor_state_machine.js b/jstests/replsets/tenant_migration_donor_state_machine.js index 8d3e9c87892..aa53687f27c 100644 --- a/jstests/replsets/tenant_migration_donor_state_machine.js +++ b/jstests/replsets/tenant_migration_donor_state_machine.js @@ -110,12 +110,6 @@ recipientRst.startSet(); recipientRst.initiate(); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName(), donorRst, recipientRst}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - donorRst.stopSet(); - recipientRst.stopSet(); - return; -} const donorPrimary = tenantMigrationTest.getDonorPrimary(); const recipientPrimary = tenantMigrationTest.getRecipientPrimary(); diff --git a/jstests/replsets/tenant_migration_donor_try_abort.js b/jstests/replsets/tenant_migration_donor_try_abort.js index 41535764048..16b1b0a71d9 100644 --- a/jstests/replsets/tenant_migration_donor_try_abort.js +++ b/jstests/replsets/tenant_migration_donor_try_abort.js @@ -31,10 +31,6 @@ const migrationX509Options = TenantMigrationUtil.makeX509OptionsForTest(); jsTestLog("Test sending donorAbortMigration before an instance's future chain begins."); const tmt = new TenantMigrationTest({name: jsTestName()}); - if (!tmt.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; - } const donorPrimary = tmt.getDonorPrimary(); let fp = configureFailPoint(donorPrimary, "pauseTenantMigrationBeforeEnteringFutureChain"); @@ -84,10 +80,6 @@ const migrationX509Options = TenantMigrationUtil.makeX509OptionsForTest(); "command repeatedly fails with retryable errors."); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName()}); - if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; - } const recipientPrimary = tenantMigrationTest.getRecipientPrimary(); let fp = configureFailPoint(recipientPrimary, "failCommand", { @@ -123,10 +115,6 @@ const migrationX509Options = TenantMigrationUtil.makeX509OptionsForTest(); "against admin.system.keys repeatedly fails with retryable errors."); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName()}); - if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; - } const recipientPrimary = tenantMigrationTest.getRecipientPrimary(); let fp = configureFailPoint(recipientPrimary, "failCommand", { @@ -163,10 +151,6 @@ const migrationX509Options = TenantMigrationUtil.makeX509OptionsForTest(); "response of recipientSyncData."); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName()}); - if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; - } const recipientPrimary = tenantMigrationTest.getRecipientPrimary(); configureFailPoint(recipientPrimary, "failCommand", { @@ -221,10 +205,7 @@ const migrationX509Options = TenantMigrationUtil.makeX509OptionsForTest(); jsTestLog("Test sending donorAbortMigration during a tenant migration while waiting for the " + "response of find against admin.system.keys."); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName()}); - if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; - } + const recipientPrimary = tenantMigrationTest.getRecipientPrimary(); configureFailPoint(recipientPrimary, "failCommand", { failInternalCommands: true, @@ -259,10 +240,6 @@ const migrationX509Options = TenantMigrationUtil.makeX509OptionsForTest(); jsTestLog("Test sending donorAbortMigration before fetching keys from admin.system.keys."); const tmt = new TenantMigrationTest({name: jsTestName()}); - if (!tmt.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; - } const barrierBeforeFetchingKeys = configureFailPoint(tmt.getDonorPrimary(), "pauseTenantMigrationBeforeFetchingKeys"); @@ -322,11 +299,6 @@ const migrationX509Options = TenantMigrationUtil.makeX509OptionsForTest(); donorRst.initiate(); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName(), donorRst: donorRst}); - if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - donorRst.stopSet(); - return; - } const tenantId = kTenantId; const migrationId = UUID(); @@ -374,10 +346,6 @@ const migrationX509Options = TenantMigrationUtil.makeX509OptionsForTest(); jsTestLog("Test sending donorAbortMigration during a tenant migration while in data sync."); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName()}); - if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; - } const donorPrimary = tenantMigrationTest.getDonorPrimary(); let fp = configureFailPoint(donorPrimary, "pauseTenantMigrationBeforeLeavingDataSyncState"); @@ -421,10 +389,6 @@ const migrationX509Options = TenantMigrationUtil.makeX509OptionsForTest(); jsTestLog("Test sending donorAbortMigration during a tenant migration while in blocking."); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName()}); - if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; - } const donorPrimary = tenantMigrationTest.getDonorPrimary(); let fp = configureFailPoint(donorPrimary, "pauseTenantMigrationBeforeLeavingBlockingState"); @@ -468,10 +432,6 @@ const migrationX509Options = TenantMigrationUtil.makeX509OptionsForTest(); jsTestLog("Test sending donorAbortMigration during a tenant migration after abort decision."); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName()}); - if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; - } const donorPrimary = tenantMigrationTest.getDonorPrimary(); let fp = configureFailPoint(donorPrimary, "abortTenantMigrationBeforeLeavingBlockingState"); @@ -499,10 +459,6 @@ const migrationX509Options = TenantMigrationUtil.makeX509OptionsForTest(); jsTestLog("Test sending donorAbortMigration during a tenant migration after commit decision."); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName()}); - if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; - } const tenantId = kTenantId; const migrationId = extractUUIDFromObject(UUID()); @@ -531,11 +487,6 @@ const migrationX509Options = TenantMigrationUtil.makeX509OptionsForTest(); donorRst.initiate(); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName(), donorRst: donorRst}); - if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - donorRst.stopSet(); - return; - } const tenantId = kTenantId; const migrationId = extractUUIDFromObject(UUID()); diff --git a/jstests/replsets/tenant_migration_donor_unblock_reads_and_writes_on_completion.js b/jstests/replsets/tenant_migration_donor_unblock_reads_and_writes_on_completion.js index 6d591d6e8fa..186d4298123 100644 --- a/jstests/replsets/tenant_migration_donor_unblock_reads_and_writes_on_completion.js +++ b/jstests/replsets/tenant_migration_donor_unblock_reads_and_writes_on_completion.js @@ -64,11 +64,6 @@ donorRst.startSet(); donorRst.initiate(); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName(), donorRst}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - donorRst.stopSet(); - return; -} const donorPrimary = tenantMigrationTest.getDonorPrimary(); const donorsColl = donorPrimary.getCollection(TenantMigrationTest.kConfigDonorsNS); diff --git a/jstests/replsets/tenant_migration_donor_wont_retry_recipientsyncdata_on_non_retriable_interruption_errors.js b/jstests/replsets/tenant_migration_donor_wont_retry_recipientsyncdata_on_non_retriable_interruption_errors.js index 725fcc97413..ed7a84112c6 100644 --- a/jstests/replsets/tenant_migration_donor_wont_retry_recipientsyncdata_on_non_retriable_interruption_errors.js +++ b/jstests/replsets/tenant_migration_donor_wont_retry_recipientsyncdata_on_non_retriable_interruption_errors.js @@ -20,10 +20,7 @@ const kTenantId = "testTenantId"; const migrationX509Options = TenantMigrationUtil.makeX509OptionsForTest(); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName()}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; -} + const donorRst = tenantMigrationTest.getDonorRst(); let recipientPrimary = tenantMigrationTest.getRecipientPrimary(); diff --git a/jstests/replsets/tenant_migration_drop_collection.js b/jstests/replsets/tenant_migration_drop_collection.js index 73db072bd71..4c54478bf08 100644 --- a/jstests/replsets/tenant_migration_drop_collection.js +++ b/jstests/replsets/tenant_migration_drop_collection.js @@ -21,14 +21,6 @@ load("jstests/replsets/libs/tenant_migration_test.js"); load("jstests/replsets/libs/tenant_migration_util.js"); load('jstests/replsets/libs/two_phase_drops.js'); -const checkFlagOnly = new TenantMigrationTest({}); -const flagEnabled = checkFlagOnly.isFeatureFlagEnabled(); -checkFlagOnly.stop(); -if (!flagEnabled) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; -} - function runDropTest({failPointName, failPointData, expectedLog, createNew}) { // Configure batch size for recipient clone. const recipientRst = new ReplSetTest({ diff --git a/jstests/replsets/tenant_migration_drop_state_doc_collection.js b/jstests/replsets/tenant_migration_drop_state_doc_collection.js index 203b7e46ee0..97606a49f2f 100644 --- a/jstests/replsets/tenant_migration_drop_state_doc_collection.js +++ b/jstests/replsets/tenant_migration_drop_state_doc_collection.js @@ -173,11 +173,6 @@ const tenantMigrationTest = new TenantMigrationTest({ initiateRstWithHighElectionTimeout: false }); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; -} - jsTest.log("Test dropping donor and recipient state doc collections during a migration."); kMigrationFpNames.forEach(fpName => { testDroppingStateDocCollections( diff --git a/jstests/replsets/tenant_migration_ensure_migration_outcome_visibility_for_blocked_writes.js b/jstests/replsets/tenant_migration_ensure_migration_outcome_visibility_for_blocked_writes.js index 37537a43f28..8e4ba566cac 100644 --- a/jstests/replsets/tenant_migration_ensure_migration_outcome_visibility_for_blocked_writes.js +++ b/jstests/replsets/tenant_migration_ensure_migration_outcome_visibility_for_blocked_writes.js @@ -58,11 +58,6 @@ function insertDocument(primaryHost, dbName, collName) { enableRecipientTesting: false, sharedOptions: {setParameter: kGarbageCollectionParams} }); - if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - donorRst.stopSet(); - return; - } const migrationId = UUID(); const tenantId = "migrationOutcome-committed"; @@ -120,11 +115,6 @@ function insertDocument(primaryHost, dbName, collName) { const tenantMigrationTest = new TenantMigrationTest( {name: jsTestName(), donorRst, sharedOptions: {setParameter: kGarbageCollectionParams}}); - if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - donorRst.stopSet(); - return; - } const migrationId = UUID(); const tenantId = "migrationOutcome-aborted"; diff --git a/jstests/replsets/tenant_migration_external_cluster_validation.js b/jstests/replsets/tenant_migration_external_cluster_validation.js index 8c160d96d67..0ad3213ec4b 100644 --- a/jstests/replsets/tenant_migration_external_cluster_validation.js +++ b/jstests/replsets/tenant_migration_external_cluster_validation.js @@ -93,12 +93,6 @@ const donorSecondaryTestDB = donorRst.getSecondary().getDB(kDbName); const recipientSecondaryTestDB = recipientRst.getSecondary().getDB(kDbName); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName(), donorRst, recipientRst}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - donorRst.stopSet(); - recipientRst.stopSet(); - return; -} createUsers(donorRst); createUsers(recipientRst); diff --git a/jstests/replsets/tenant_migration_external_keys_ttl.js b/jstests/replsets/tenant_migration_external_keys_ttl.js index 3a09ad7188b..3971b7136ee 100644 --- a/jstests/replsets/tenant_migration_external_keys_ttl.js +++ b/jstests/replsets/tenant_migration_external_keys_ttl.js @@ -99,12 +99,6 @@ function makeTestParams() { const tmt = new TenantMigrationTest( {name: jsTestName(), sharedOptions: {setParameter: ttlMonitorOptions}}); - if (!tmt.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - tmt.stop(); - return; - } - // Verify the external keys TTL index is created on both replica sets on stepup. waitForExternalKeysTTLIndex(tmt.getDonorPrimary()); waitForExternalKeysTTLIndex(tmt.getRecipientPrimary()); @@ -222,13 +216,6 @@ function makeTestParams() { recipientRst.initiate(); const tmt = new TenantMigrationTest({name: jsTestName(), donorRst, recipientRst}); - if (!tmt.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - donorRst.stopSet(); - recipientRst.stopSet(); - tmt.stop(); - return; - } jsTestLog("Donor failover before receiving forgetMigration"); { diff --git a/jstests/replsets/tenant_migration_fetch_committed_transactions.js b/jstests/replsets/tenant_migration_fetch_committed_transactions.js index d606b5075ea..ec1ad0b1a56 100644 --- a/jstests/replsets/tenant_migration_fetch_committed_transactions.js +++ b/jstests/replsets/tenant_migration_fetch_committed_transactions.js @@ -22,10 +22,6 @@ load("jstests/replsets/rslib.js"); load("jstests/libs/uuid_util.js"); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName()}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; -} const tenantId = "testTenantId"; const tenantDB = tenantMigrationTest.tenantDB(tenantId, "testDB"); diff --git a/jstests/replsets/tenant_migration_fetch_committed_transactions_retry.js b/jstests/replsets/tenant_migration_fetch_committed_transactions_retry.js index a1e619be792..26cb8783a06 100644 --- a/jstests/replsets/tenant_migration_fetch_committed_transactions_retry.js +++ b/jstests/replsets/tenant_migration_fetch_committed_transactions_retry.js @@ -24,10 +24,6 @@ load("jstests/replsets/libs/tenant_migration_test.js"); load("jstests/libs/uuid_util.js"); let tenantMigrationTest = new TenantMigrationTest({name: jsTestName(), sharedOptions: {nodes: 1}}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; -} const tenantId = "testTenantId"; const collName = "testColl"; diff --git a/jstests/replsets/tenant_migration_filters_tenant_id.js b/jstests/replsets/tenant_migration_filters_tenant_id.js index 9982ec38cde..a897a65aa87 100644 --- a/jstests/replsets/tenant_migration_filters_tenant_id.js +++ b/jstests/replsets/tenant_migration_filters_tenant_id.js @@ -18,10 +18,6 @@ load("jstests/replsets/libs/tenant_migration_test.js"); load("jstests/replsets/libs/tenant_migration_util.js"); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName()}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; -} const tenantIdPrefix = "tenantId"; const baseDBName = "testDB"; diff --git a/jstests/replsets/tenant_migration_find_and_modify_retry.js b/jstests/replsets/tenant_migration_find_and_modify_retry.js index 908477862f5..1d683e1ec07 100644 --- a/jstests/replsets/tenant_migration_find_and_modify_retry.js +++ b/jstests/replsets/tenant_migration_find_and_modify_retry.js @@ -24,10 +24,6 @@ load("jstests/libs/fail_point_util.js"); // For configureFailPoint(). const tenantMigrationTest = new TenantMigrationTest({name: jsTestName()}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; -} const kTenantId = "testTenantId"; const kDbName = tenantMigrationTest.tenantDB(kTenantId, "testDB"); const kCollName = "testColl"; diff --git a/jstests/replsets/tenant_migration_ignore_create_index_on_nonempty_collection.js b/jstests/replsets/tenant_migration_ignore_create_index_on_nonempty_collection.js index 78bbe38f90e..e713a911929 100644 --- a/jstests/replsets/tenant_migration_ignore_create_index_on_nonempty_collection.js +++ b/jstests/replsets/tenant_migration_ignore_create_index_on_nonempty_collection.js @@ -22,10 +22,6 @@ load("jstests/libs/fail_point_util.js"); // For configureFailPoint(). const tenantMigrationTest = new TenantMigrationTest({name: jsTestName()}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; -} const kTenantId = "testTenantId"; const kDbName = tenantMigrationTest.tenantDB(kTenantId, "testDB"); const kCollName = "testColl"; diff --git a/jstests/replsets/tenant_migration_index_oplog_entries.js b/jstests/replsets/tenant_migration_index_oplog_entries.js index 6eafbe5abb5..5e83e1abf70 100644 --- a/jstests/replsets/tenant_migration_index_oplog_entries.js +++ b/jstests/replsets/tenant_migration_index_oplog_entries.js @@ -22,11 +22,6 @@ const kNs = kDbName + "." + kCollName; const rst = new ReplSetTest({nodes: 1}); rst.startSet(); rst.initiate(); -if (!TenantMigrationUtil.isFeatureFlagEnabled(rst.getPrimary())) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - rst.stopSet(); - return; -} const primary = rst.getPrimary(); const testDB = primary.getDB(kDbName); diff --git a/jstests/replsets/tenant_migration_invalid_inputs.js b/jstests/replsets/tenant_migration_invalid_inputs.js index d2954ce1ee0..3abcf0fa6e5 100644 --- a/jstests/replsets/tenant_migration_invalid_inputs.js +++ b/jstests/replsets/tenant_migration_invalid_inputs.js @@ -21,11 +21,6 @@ load("jstests/replsets/libs/tenant_migration_util.js"); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName(), enableRecipientTesting: false}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; -} - const donorPrimary = tenantMigrationTest.getDonorPrimary(); const recipientPrimary = tenantMigrationTest.getRecipientPrimary(); diff --git a/jstests/replsets/tenant_migration_large_txn.js b/jstests/replsets/tenant_migration_large_txn.js index ac341baeb42..b68071228ce 100644 --- a/jstests/replsets/tenant_migration_large_txn.js +++ b/jstests/replsets/tenant_migration_large_txn.js @@ -24,10 +24,6 @@ load("jstests/replsets/libs/tenant_migration_test.js"); load("jstests/replsets/libs/tenant_migration_util.js"); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName()}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; -} const kTenantId = "testTenantId"; const kDbName = tenantMigrationTest.tenantDB(kTenantId, "testDB"); diff --git a/jstests/replsets/tenant_migration_logs.js b/jstests/replsets/tenant_migration_logs.js index e33bd6ce790..63fe70d7339 100644 --- a/jstests/replsets/tenant_migration_logs.js +++ b/jstests/replsets/tenant_migration_logs.js @@ -26,10 +26,6 @@ function assertNoCertificateOrPrivateKeyLogsForCmd(conn, cmdName) { } const tenantMigrationTest = new TenantMigrationTest({name: jsTestName()}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; -} const donorPrimary = tenantMigrationTest.getDonorPrimary(); const recipientPrimary = tenantMigrationTest.getRecipientPrimary(); diff --git a/jstests/replsets/tenant_migration_metrics_output.js b/jstests/replsets/tenant_migration_metrics_output.js index 460ea5ee29a..e7ef0abd558 100644 --- a/jstests/replsets/tenant_migration_metrics_output.js +++ b/jstests/replsets/tenant_migration_metrics_output.js @@ -45,11 +45,6 @@ donorRst.initiate(); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName(), donorRst, enableRecipientTesting: false}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - donorRst.stopSet(); - return; -} const tenantId = "testTenantId"; const migrationId = extractUUIDFromObject(UUID()); diff --git a/jstests/replsets/tenant_migration_multi_writes.js b/jstests/replsets/tenant_migration_multi_writes.js index 83c9388a273..59b7ed913b5 100644 --- a/jstests/replsets/tenant_migration_multi_writes.js +++ b/jstests/replsets/tenant_migration_multi_writes.js @@ -39,12 +39,6 @@ donorRst.startSet(); donorRst.initiateWithHighElectionTimeout(); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName(), donorRst: donorRst}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - donorRst.stopSet(); - return; -} - const recipientRst = tenantMigrationTest.getRecipientRst(); const donorPrimary = donorRst.getPrimary(); diff --git a/jstests/replsets/tenant_migration_multikey_index.js b/jstests/replsets/tenant_migration_multikey_index.js index 487a026f599..0fca95e669a 100644 --- a/jstests/replsets/tenant_migration_multikey_index.js +++ b/jstests/replsets/tenant_migration_multikey_index.js @@ -47,12 +47,6 @@ recipientRst.startSet(); recipientRst.initiateWithHighElectionTimeout(); const recipientPrimary = recipientRst.getPrimary(); -if (!TenantMigrationUtil.isFeatureFlagEnabled(recipientPrimary)) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - recipientRst.stopSet(); - return; -} - const tenantMigrationTest = new TenantMigrationTest({name: jsTestName(), recipientRst: recipientRst}); const donorPrimary = tenantMigrationTest.getDonorPrimary(); diff --git a/jstests/replsets/tenant_migration_network_error_via_rollback.js b/jstests/replsets/tenant_migration_network_error_via_rollback.js index 5bf08685e9d..030417af62f 100644 --- a/jstests/replsets/tenant_migration_network_error_via_rollback.js +++ b/jstests/replsets/tenant_migration_network_error_via_rollback.js @@ -59,11 +59,6 @@ function runTest({failPointName, failPointData = {}, batchSize = 10 * 1000}) { sharedOptions: {setParameter: {collectionClonerBatchSize: batchSize}} }); - if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; - } - const tenantId = "testTenantId"; const dbName = tenantMigrationTest.tenantDB(tenantId, "testDB"); const collName = "testColl"; diff --git a/jstests/replsets/tenant_migration_no_failover.js b/jstests/replsets/tenant_migration_no_failover.js index e0be5088683..e7b67ed8a44 100644 --- a/jstests/replsets/tenant_migration_no_failover.js +++ b/jstests/replsets/tenant_migration_no_failover.js @@ -18,10 +18,6 @@ load("jstests/libs/uuid_util.js"); load("jstests/replsets/libs/tenant_migration_test.js"); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName()}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; -} const tenantId = "testTenantId"; const dbNames = ["db0", "db1", "db2"]; diff --git a/jstests/replsets/tenant_migration_oplog_view.js b/jstests/replsets/tenant_migration_oplog_view.js index 180f74cba7f..5b010cbea4d 100644 --- a/jstests/replsets/tenant_migration_oplog_view.js +++ b/jstests/replsets/tenant_migration_oplog_view.js @@ -40,13 +40,6 @@ donorRst.startSet(); donorRst.initiate(); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName(), donorRst}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - donorRst.stopSet(); - tenantMigrationTest.stop(); - return; -} - const dbName = "test"; const collName = "collection"; diff --git a/jstests/replsets/tenant_migration_read_your_own_writes.js b/jstests/replsets/tenant_migration_read_your_own_writes.js index 0548068ef76..ea13d6ab234 100644 --- a/jstests/replsets/tenant_migration_read_your_own_writes.js +++ b/jstests/replsets/tenant_migration_read_your_own_writes.js @@ -23,10 +23,6 @@ load("jstests/libs/fail_point_util.js"); // For configureFailPoint(). const tenantMigrationTest = new TenantMigrationTest({name: jsTestName(), allowStaleReadsOnDonor: false}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; -} const kTenantId = "testTenantId"; const kDbName = tenantMigrationTest.tenantDB(kTenantId, "testDB"); const kCollName = "testColl"; diff --git a/jstests/replsets/tenant_migration_recipient_current_op.js b/jstests/replsets/tenant_migration_recipient_current_op.js index 171c668cfcd..68b85c0510e 100644 --- a/jstests/replsets/tenant_migration_recipient_current_op.js +++ b/jstests/replsets/tenant_migration_recipient_current_op.js @@ -24,10 +24,6 @@ load("jstests/replsets/libs/tenant_migration_test.js"); load("jstests/replsets/libs/tenant_migration_util.js"); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName()}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; -} // An object that mirrors the recipient migration states. const migrationStates = { diff --git a/jstests/replsets/tenant_migration_recipient_does_not_change_sync_source_after_step_down.js b/jstests/replsets/tenant_migration_recipient_does_not_change_sync_source_after_step_down.js index 26a72b1eb56..49941bedf1c 100644 --- a/jstests/replsets/tenant_migration_recipient_does_not_change_sync_source_after_step_down.js +++ b/jstests/replsets/tenant_migration_recipient_does_not_change_sync_source_after_step_down.js @@ -46,12 +46,6 @@ const recipientRst = new ReplSetTest({ recipientRst.startSet(); recipientRst.initiateWithHighElectionTimeout(); -if (!TenantMigrationUtil.isFeatureFlagEnabled(recipientRst.getPrimary())) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - recipientRst.stopSet(); - return; -} - const tenantMigrationTest = new TenantMigrationTest({name: jsTestName(), recipientRst: recipientRst}); const donorRst = tenantMigrationTest.getDonorRst(); diff --git a/jstests/replsets/tenant_migration_recipient_failover_before_creating_oplog_buffer.js b/jstests/replsets/tenant_migration_recipient_failover_before_creating_oplog_buffer.js index 22f42f28bea..3a1b29998e7 100644 --- a/jstests/replsets/tenant_migration_recipient_failover_before_creating_oplog_buffer.js +++ b/jstests/replsets/tenant_migration_recipient_failover_before_creating_oplog_buffer.js @@ -22,11 +22,6 @@ load("jstests/replsets/libs/tenant_migration_util.js"); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName(), sharedOptions: {nodes: 2}}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; -} - const kMigrationId = UUID(); const kTenantId = 'testTenantId'; const kReadPreference = { diff --git a/jstests/replsets/tenant_migration_recipient_fetches_retryable_writes_entry_after_committed_snapshot.js b/jstests/replsets/tenant_migration_recipient_fetches_retryable_writes_entry_after_committed_snapshot.js index 3b4472aeb2f..b7f4ad4c523 100644 --- a/jstests/replsets/tenant_migration_recipient_fetches_retryable_writes_entry_after_committed_snapshot.js +++ b/jstests/replsets/tenant_migration_recipient_fetches_retryable_writes_entry_after_committed_snapshot.js @@ -72,12 +72,6 @@ donorRst.startSet(); donorRst.initiateWithHighElectionTimeout(); const donorPrimary = donorRst.getPrimary(); -if (!TenantMigrationUtil.isFeatureFlagEnabled(donorPrimary)) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - donorRst.stopSet(); - return; -} - const tenantMigrationTest = new TenantMigrationTest({name: jsTestName(), donorRst: donorRst}); const recipientPrimary = tenantMigrationTest.getRecipientPrimary(); diff --git a/jstests/replsets/tenant_migration_recipient_has_tenant_data.js b/jstests/replsets/tenant_migration_recipient_has_tenant_data.js index 690410d4d2a..8cf364dbff1 100644 --- a/jstests/replsets/tenant_migration_recipient_has_tenant_data.js +++ b/jstests/replsets/tenant_migration_recipient_has_tenant_data.js @@ -39,11 +39,6 @@ donorRst.initiate(); const tenantMigrationTest = new TenantMigrationTest( {name: jsTestName(), donorRst, sharedOptions: {setParameter: kGarbageCollectionParams}}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - donorRst.stopSet(); - return; -} const kTenantId = "testTenantId"; const kNs = kTenantId + "_testDb.testColl"; diff --git a/jstests/replsets/tenant_migration_recipient_initial_sync_cloning.js b/jstests/replsets/tenant_migration_recipient_initial_sync_cloning.js index d7676116813..55d18140d65 100644 --- a/jstests/replsets/tenant_migration_recipient_initial_sync_cloning.js +++ b/jstests/replsets/tenant_migration_recipient_initial_sync_cloning.js @@ -34,12 +34,6 @@ const donorRst = new ReplSetTest({ donorRst.startSet(); donorRst.initiate(); -if (!TenantMigrationUtil.isFeatureFlagEnabled(donorRst.getPrimary())) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - donorRst.stopSet(); - return; -} - const testDBName = 'testDB'; const testCollName = 'testColl'; diff --git a/jstests/replsets/tenant_migration_recipient_initial_sync_recovery.js b/jstests/replsets/tenant_migration_recipient_initial_sync_recovery.js index 834591c1ff7..49fd81c955e 100644 --- a/jstests/replsets/tenant_migration_recipient_initial_sync_recovery.js +++ b/jstests/replsets/tenant_migration_recipient_initial_sync_recovery.js @@ -22,10 +22,6 @@ load("jstests/libs/write_concern_util.js"); load("jstests/replsets/libs/tenant_migration_test.js"); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName()}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; -} const kMaxSleepTimeMS = 7500; const kTenantId = 'testTenantId'; diff --git a/jstests/replsets/tenant_migration_recipient_invalidates_in_memory_txns.js b/jstests/replsets/tenant_migration_recipient_invalidates_in_memory_txns.js index 05661703141..3e59ab6196b 100644 --- a/jstests/replsets/tenant_migration_recipient_invalidates_in_memory_txns.js +++ b/jstests/replsets/tenant_migration_recipient_invalidates_in_memory_txns.js @@ -33,11 +33,6 @@ const setParameterOpts = { }; const tenantMigrationTest = new TenantMigrationTest({name: jsTestName(), sharedOptions: {setParameter: setParameterOpts}}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - tenantMigrationTest.stop(); - return; -} const tenantId = "testTenantId"; const tenantDB = tenantMigrationTest.tenantDB(tenantId, "testDB"); diff --git a/jstests/replsets/tenant_migration_recipient_resume_on_stepup_and_restart.js b/jstests/replsets/tenant_migration_recipient_resume_on_stepup_and_restart.js index b506b701e03..7391bfac315 100644 --- a/jstests/replsets/tenant_migration_recipient_resume_on_stepup_and_restart.js +++ b/jstests/replsets/tenant_migration_recipient_resume_on_stepup_and_restart.js @@ -44,11 +44,7 @@ function testRecipientSyncDataInterrupt(interruptFunc, recipientRestarted) { recipientRst.initiate(); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName(), recipientRst}); - if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - recipientRst.stopSet(); - return; - } + const donorRst = tenantMigrationTest.getDonorRst(); const donorPrimary = tenantMigrationTest.getDonorPrimary(); let recipientPrimary = tenantMigrationTest.getRecipientPrimary(); @@ -134,12 +130,6 @@ function testRecipientForgetMigrationInterrupt(interruptFunc) { const tenantMigrationTest = new TenantMigrationTest({name: jsTestName(), donorRst, recipientRst}); - if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - donorRst.stopSet(); - recipientRst.stopSet(); - return; - } const recipientPrimary = tenantMigrationTest.getRecipientPrimary(); const migrationId = UUID(); diff --git a/jstests/replsets/tenant_migration_recipient_resumes_on_donor_failover.js b/jstests/replsets/tenant_migration_recipient_resumes_on_donor_failover.js index 8c5ccae95f3..445321f7253 100644 --- a/jstests/replsets/tenant_migration_recipient_resumes_on_donor_failover.js +++ b/jstests/replsets/tenant_migration_recipient_resumes_on_donor_failover.js @@ -44,11 +44,7 @@ function runTest(failPoint) { const tenantMigrationTest = new TenantMigrationTest({name: jsTestName(), recipientRst, sharedOptions: {nodes: 3}}); - if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - recipientRst.stopSet(); - return false; - } + jsTestLog("Running test with failpoint: " + failPoint); const tenantId = "testTenantId"; const tenantDB = tenantMigrationTest.tenantDB(tenantId, "DB"); diff --git a/jstests/replsets/tenant_migration_recipient_retry_forget_migration.js b/jstests/replsets/tenant_migration_recipient_retry_forget_migration.js index cac8bf9a7be..f4136c0f99c 100644 --- a/jstests/replsets/tenant_migration_recipient_retry_forget_migration.js +++ b/jstests/replsets/tenant_migration_recipient_retry_forget_migration.js @@ -21,11 +21,6 @@ load("jstests/replsets/libs/tenant_migration_util.js"); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName()}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; -} - const migrationId = UUID(); const tenantId = 'testTenantId'; const recipientCertificateForDonor = diff --git a/jstests/replsets/tenant_migration_recipient_retryable_writes_failover.js b/jstests/replsets/tenant_migration_recipient_retryable_writes_failover.js index c328174f85a..3fc35f5d772 100644 --- a/jstests/replsets/tenant_migration_recipient_retryable_writes_failover.js +++ b/jstests/replsets/tenant_migration_recipient_retryable_writes_failover.js @@ -27,11 +27,6 @@ if (!RetryableWritesUtil.storageEngineSupportsRetryableWrites(jsTest.options().s const tenantMigrationTest = new TenantMigrationTest({name: jsTestName(), sharedOptions: {nodes: 2}}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; -} - const kMigrationId = UUID(); const kTenantId = 'testTenantId'; const kDbName = tenantMigrationTest.tenantDB(kTenantId, "testDb"); diff --git a/jstests/replsets/tenant_migration_recipient_rollback_recovery.js b/jstests/replsets/tenant_migration_recipient_rollback_recovery.js index 4ae95ef218c..f011d9a3a7a 100644 --- a/jstests/replsets/tenant_migration_recipient_rollback_recovery.js +++ b/jstests/replsets/tenant_migration_recipient_rollback_recovery.js @@ -44,12 +44,6 @@ donorRst.startSet(); donorRst.initiate(); const donorRstArgs = TenantMigrationUtil.createRstArgs(donorRst); -if (!TenantMigrationUtil.isFeatureFlagEnabled(donorRst.getPrimary())) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - donorRst.stopSet(); - return; -} - function makeMigrationOpts(tenantMigrationTest, migrationId, tenantId) { return { migrationIdString: extractUUIDFromObject(migrationId), diff --git a/jstests/replsets/tenant_migration_recipient_startup_recovery.js b/jstests/replsets/tenant_migration_recipient_startup_recovery.js index 08fdb6bb152..eeb7f0fe1c3 100644 --- a/jstests/replsets/tenant_migration_recipient_startup_recovery.js +++ b/jstests/replsets/tenant_migration_recipient_startup_recovery.js @@ -33,11 +33,6 @@ recipientRst.startSet(); recipientRst.initiate(); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName(), recipientRst}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - recipientRst.stopSet(); - return; -} const kMaxSleepTimeMS = 7500; const kTenantId = 'testTenantId'; diff --git a/jstests/replsets/tenant_migration_recipient_stepdown_after_forget.js b/jstests/replsets/tenant_migration_recipient_stepdown_after_forget.js index cd5d99c30a0..0132d8e8840 100644 --- a/jstests/replsets/tenant_migration_recipient_stepdown_after_forget.js +++ b/jstests/replsets/tenant_migration_recipient_stepdown_after_forget.js @@ -24,12 +24,6 @@ load("jstests/replsets/libs/tenant_migration_util.js"); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName(), sharedOptions: {nodes: 2}}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - tenantMigrationTest.stop(); - return; -} - const kMigrationId = UUID(); const kTenantId = 'testTenantId'; const kReadPreference = { diff --git a/jstests/replsets/tenant_migration_recipient_sync_data_timeout.js b/jstests/replsets/tenant_migration_recipient_sync_data_timeout.js index b5a0338490b..2e772dbf415 100644 --- a/jstests/replsets/tenant_migration_recipient_sync_data_timeout.js +++ b/jstests/replsets/tenant_migration_recipient_sync_data_timeout.js @@ -18,10 +18,6 @@ load("jstests/libs/uuid_util.js"); load("jstests/replsets/libs/tenant_migration_test.js"); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName()}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; -} const kTenantId = "testTenantId"; diff --git a/jstests/replsets/tenant_migration_recipient_sync_donor_timestamp.js b/jstests/replsets/tenant_migration_recipient_sync_donor_timestamp.js index 44704e8a516..359a1174940 100644 --- a/jstests/replsets/tenant_migration_recipient_sync_donor_timestamp.js +++ b/jstests/replsets/tenant_migration_recipient_sync_donor_timestamp.js @@ -25,11 +25,6 @@ load("jstests/replsets/libs/tenant_migration_util.js"); const tenantMigrationTest = new TenantMigrationTest( {name: jsTestName(), sharedOptions: {setParameter: {tenantApplierBatchSizeOps: 2}}}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; -} - const kMigrationId = UUID(); const kTenantId = 'testTenantId'; const kReadPreference = { diff --git a/jstests/replsets/tenant_migration_recipient_ttl.js b/jstests/replsets/tenant_migration_recipient_ttl.js index e1558c85af9..20100d9ebf8 100644 --- a/jstests/replsets/tenant_migration_recipient_ttl.js +++ b/jstests/replsets/tenant_migration_recipient_ttl.js @@ -28,12 +28,6 @@ const kGarbageCollectionParams = { const tenantMigrationTest = new TenantMigrationTest( {name: jsTestName(), sharedOptions: {setParameter: kGarbageCollectionParams}}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - tenantMigrationTest.stop(); - return; -} - const kRecipientTTLIndexName = "TenantMigrationRecipientTTLIndex"; const kMigrationId = UUID(); diff --git a/jstests/replsets/tenant_migration_resume_collection_cloner_after_recipient_failover.js b/jstests/replsets/tenant_migration_resume_collection_cloner_after_recipient_failover.js index bca4f2417d5..89a00c55598 100644 --- a/jstests/replsets/tenant_migration_resume_collection_cloner_after_recipient_failover.js +++ b/jstests/replsets/tenant_migration_resume_collection_cloner_after_recipient_failover.js @@ -42,13 +42,6 @@ const tenantMigrationFailoverTest = function(isTimeSeries, createCollFn, docs) { new TenantMigrationTest({name: jsTestName(), recipientRst: recipientRst}); const donorPrimary = tenantMigrationTest.getDonorPrimary(); - if (!TenantMigrationUtil.isFeatureFlagEnabled(donorPrimary)) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - tenantMigrationTest.stop(); - recipientRst.stopSet(); - return; - } - if (isTimeSeries && !TimeseriesTest.timeseriesCollectionsEnabled(donorPrimary)) { jsTestLog("Skipping test because the time-series collection feature flag is disabled"); tenantMigrationTest.stop(); diff --git a/jstests/replsets/tenant_migration_resume_collection_cloner_after_rename.js b/jstests/replsets/tenant_migration_resume_collection_cloner_after_rename.js index a416a4072a5..e50e9c48c40 100644 --- a/jstests/replsets/tenant_migration_resume_collection_cloner_after_rename.js +++ b/jstests/replsets/tenant_migration_resume_collection_cloner_after_rename.js @@ -35,11 +35,6 @@ const recipientRst = new ReplSetTest({ recipientRst.startSet(); recipientRst.initiate(); -if (!TenantMigrationUtil.isFeatureFlagEnabled(recipientRst.getPrimary())) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - recipientRst.stopSet(); - return; -} const tenantMigrationTest = new TenantMigrationTest({name: jsTestName(), recipientRst: recipientRst}); diff --git a/jstests/replsets/tenant_migration_resume_oplog_application.js b/jstests/replsets/tenant_migration_resume_oplog_application.js index 470e2860448..da857c9cd70 100644 --- a/jstests/replsets/tenant_migration_resume_oplog_application.js +++ b/jstests/replsets/tenant_migration_resume_oplog_application.js @@ -31,11 +31,7 @@ const recipientRst = new ReplSetTest({ recipientRst.startSet(); recipientRst.initiate(); -if (!TenantMigrationUtil.isFeatureFlagEnabled(recipientRst.getPrimary())) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - recipientRst.stopSet(); - return; -} + const tenantMigrationTest = new TenantMigrationTest({name: jsTestName(), recipientRst: recipientRst}); diff --git a/jstests/replsets/tenant_migration_retry_session_migration.js b/jstests/replsets/tenant_migration_retry_session_migration.js index 255625dc641..27e7069bca4 100644 --- a/jstests/replsets/tenant_migration_retry_session_migration.js +++ b/jstests/replsets/tenant_migration_retry_session_migration.js @@ -31,10 +31,6 @@ const kGarbageCollectionParams = { const tenantMigrationTest = new TenantMigrationTest( {name: jsTestName(), sharedOptions: {setParameter: kGarbageCollectionParams}}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; -} const kTenantId = "testTenantId"; const kDbName = tenantMigrationTest.tenantDB(kTenantId, "testDB"); const kCollName = "testColl"; diff --git a/jstests/replsets/tenant_migration_retryable_write_retry.js b/jstests/replsets/tenant_migration_retryable_write_retry.js index 20aed6dc943..ea0f6e85347 100644 --- a/jstests/replsets/tenant_migration_retryable_write_retry.js +++ b/jstests/replsets/tenant_migration_retryable_write_retry.js @@ -41,12 +41,6 @@ recipientRst.startSet(); recipientRst.initiate(); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName(), donorRst, recipientRst}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - donorRst.stopSet(); - recipientRst.stopSet(); - return; -} const kTenantId = "testTenantId"; const kDbName = tenantMigrationTest.tenantDB(kTenantId, "testDb"); diff --git a/jstests/replsets/tenant_migration_retryable_write_retry_on_recipient.js b/jstests/replsets/tenant_migration_retryable_write_retry_on_recipient.js index c02647057c1..6e3746c867e 100644 --- a/jstests/replsets/tenant_migration_retryable_write_retry_on_recipient.js +++ b/jstests/replsets/tenant_migration_retryable_write_retry_on_recipient.js @@ -21,10 +21,6 @@ load("jstests/libs/parallelTester.js"); // for 'Thread' load("jstests/libs/uuid_util.js"); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName()}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; -} const kTenantId = "testTenantId"; const kDbName = tenantMigrationTest.tenantDB(kTenantId, "testDb"); diff --git a/jstests/replsets/tenant_migration_ssl_configuration.js b/jstests/replsets/tenant_migration_ssl_configuration.js index 4525266075b..7519acf4b47 100644 --- a/jstests/replsets/tenant_migration_ssl_configuration.js +++ b/jstests/replsets/tenant_migration_ssl_configuration.js @@ -34,10 +34,6 @@ const kExpiredMigrationCertificates = { jsTest.log( "Test that certificate fields are required when tenantMigrationDisableX509Auth=false"); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName()}); - if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; - } const donorPrimary = tenantMigrationTest.getDonorPrimary(); const recipientPrimary = tenantMigrationTest.getRecipientPrimary(); @@ -100,11 +96,6 @@ const kExpiredMigrationCertificates = { donorRst.initiate(); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName(), donorRst}); - if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - donorRst.stopSet(); - return; - } const donorPrimary = tenantMigrationTest.getDonorPrimary(); @@ -131,11 +122,6 @@ const kExpiredMigrationCertificates = { recipientRst.initiate(); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName(), recipientRst}); - if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - recipientRst.stopSet(); - return; - } const recipientPrimary = tenantMigrationTest.getRecipientPrimary(); @@ -169,12 +155,6 @@ const kExpiredMigrationCertificates = { recipientRst.initiate(); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName(), recipientRst}); - if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - recipientRst.stopSet(); - return; - } - const recipientPrimary = tenantMigrationTest.getRecipientPrimary(); assert.commandWorked(recipientPrimary.adminCommand({ @@ -206,11 +186,6 @@ const kExpiredMigrationCertificates = { recipientRst.initiate(); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName(), recipientRst}); - if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - recipientRst.stopSet(); - return; - } const recipientPrimary = tenantMigrationTest.getRecipientPrimary(); @@ -251,12 +226,6 @@ const kExpiredMigrationCertificates = { const tenantMigrationTest = new TenantMigrationTest({name: jsTestName(), donorRst, recipientRst}); - if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - donorRst.stopSet(); - recipientRst.stopSet(); - return; - } const migrationId = UUID(); const donorStartMigrationCmdObj = { @@ -303,12 +272,6 @@ const kExpiredMigrationCertificates = { const tenantMigrationTest = new TenantMigrationTest({name: jsTestName(), donorRst, recipientRst}); - if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - donorRst.stopSet(); - recipientRst.stopSet(); - return; - } const donorStartMigrationCmdObj = { donorStartMigration: 1, @@ -355,12 +318,6 @@ const kExpiredMigrationCertificates = { const tenantMigrationTest = new TenantMigrationTest({name: jsTestName(), donorRst, recipientRst}); - if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - donorRst.stopSet(); - recipientRst.stopSet(); - return; - } const donorStartMigrationCmdObj = { donorStartMigration: 1, diff --git a/jstests/replsets/tenant_migration_stepup_recovery_after_abort.js b/jstests/replsets/tenant_migration_stepup_recovery_after_abort.js index 4f5f4c73838..b65e7783cf6 100644 --- a/jstests/replsets/tenant_migration_stepup_recovery_after_abort.js +++ b/jstests/replsets/tenant_migration_stepup_recovery_after_abort.js @@ -35,11 +35,6 @@ donorRst.initiate(); const tenantMigrationTest = new TenantMigrationTest( {name: jsTestName(), donorRst, sharedOptions: {setParameter: kGarbageCollectionParams}}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - donorRst.stopSet(); - return; -} const tenantId = "testTenantId"; const migrationId = UUID(); diff --git a/jstests/replsets/tenant_migration_sync_source_too_stale.js b/jstests/replsets/tenant_migration_sync_source_too_stale.js index 801d2ceb295..60abaa24ccf 100644 --- a/jstests/replsets/tenant_migration_sync_source_too_stale.js +++ b/jstests/replsets/tenant_migration_sync_source_too_stale.js @@ -41,12 +41,6 @@ const donorRst = new ReplSetTest({ donorRst.startSet(); donorRst.initiateWithHighElectionTimeout(); -if (!TenantMigrationUtil.isFeatureFlagEnabled(donorRst.getPrimary())) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - donorRst.stopSet(); - return; -} - const tenantMigrationTest = new TenantMigrationTest({ name: jsTestName(), donorRst, diff --git a/jstests/replsets/tenant_migration_test_max_bson_limit.js b/jstests/replsets/tenant_migration_test_max_bson_limit.js index 02f49e3c027..e406b9c5f49 100644 --- a/jstests/replsets/tenant_migration_test_max_bson_limit.js +++ b/jstests/replsets/tenant_migration_test_max_bson_limit.js @@ -42,10 +42,6 @@ function bulkWriteDocsUnordered(primaryHost, dbName, collName, numDocs) { jsTestLog("Testing that large write errors fit within the BSON size limit."); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName()}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; -} const tenantId = "bulkUnorderedInserts-committed"; const migrationOpts = { diff --git a/jstests/replsets/tenant_migration_timeseries_collections.js b/jstests/replsets/tenant_migration_timeseries_collections.js index 4cd714e2594..e2e65a8fcf2 100644 --- a/jstests/replsets/tenant_migration_timeseries_collections.js +++ b/jstests/replsets/tenant_migration_timeseries_collections.js @@ -18,10 +18,6 @@ load("jstests/libs/uuid_util.js"); load("jstests/replsets/libs/tenant_migration_test.js"); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName()}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; -} const donorPrimary = tenantMigrationTest.getDonorPrimary(); if (!TimeseriesTest.timeseriesCollectionsEnabled(donorPrimary)) { diff --git a/jstests/replsets/tenant_migration_timeseries_retryable_write_oplog_cloning.js b/jstests/replsets/tenant_migration_timeseries_retryable_write_oplog_cloning.js index fc772d30714..05b52a0bf81 100644 --- a/jstests/replsets/tenant_migration_timeseries_retryable_write_oplog_cloning.js +++ b/jstests/replsets/tenant_migration_timeseries_retryable_write_oplog_cloning.js @@ -54,12 +54,6 @@ function testOplogCloning(ordered) { const tenantMigrationTest = new TenantMigrationTest({name: jsTestName(), donorRst, recipientRst}); - if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - donorRst.stopSet(); - recipientRst.stopSet(); - return; - } const donorPrimary = donorRst.getPrimary(); if (!TimeseriesTest.timeseriesCollectionsEnabled(donorPrimary)) { diff --git a/jstests/replsets/tenant_migration_timeseries_retryable_write_retry_on_recipient.js b/jstests/replsets/tenant_migration_timeseries_retryable_write_retry_on_recipient.js index e00d527ad5b..2108354cd7c 100644 --- a/jstests/replsets/tenant_migration_timeseries_retryable_write_retry_on_recipient.js +++ b/jstests/replsets/tenant_migration_timeseries_retryable_write_retry_on_recipient.js @@ -25,10 +25,6 @@ load("jstests/libs/uuid_util.js"); function testRetryOnRecipient(ordered) { const tenantMigrationTest = new TenantMigrationTest({name: jsTestName()}); - if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; - } const donorPrimary = tenantMigrationTest.getDonorPrimary(); if (!TimeseriesTest.timeseriesCollectionsEnabled(donorPrimary)) { diff --git a/jstests/replsets/tenant_migration_v1_id_index.js b/jstests/replsets/tenant_migration_v1_id_index.js index d47610c8b4d..2ebbe156710 100644 --- a/jstests/replsets/tenant_migration_v1_id_index.js +++ b/jstests/replsets/tenant_migration_v1_id_index.js @@ -18,10 +18,6 @@ load("jstests/libs/uuid_util.js"); load("jstests/replsets/libs/tenant_migration_test.js"); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName()}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; -} const tenantId = 'testTenantId'; const migrationOpts = { diff --git a/jstests/replsets/tenant_migration_x509.js b/jstests/replsets/tenant_migration_x509.js index b0df22d9fa7..e0a5169a3f5 100644 --- a/jstests/replsets/tenant_migration_x509.js +++ b/jstests/replsets/tenant_migration_x509.js @@ -23,10 +23,6 @@ function makeTestNs(tenantId) { } const tenantMigrationTest = new TenantMigrationTest({name: jsTestName()}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; -} const kDonorCertificateAndPrivateKey = TenantMigrationUtil.getCertificateAndPrivateKey("jstests/libs/tenant_migration_donor.pem"); diff --git a/jstests/replsets/tenant_migrations_back_to_back.js b/jstests/replsets/tenant_migrations_back_to_back.js index d5d53fd7b00..a88120fd8ba 100644 --- a/jstests/replsets/tenant_migrations_back_to_back.js +++ b/jstests/replsets/tenant_migrations_back_to_back.js @@ -24,10 +24,6 @@ load("jstests/libs/uuid_util.js"); load("jstests/replsets/rslib.js"); // for 'getLastOpTime' const tenantMigrationTest = new TenantMigrationTest({name: jsTestName()}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; -} const kTenantId = "testTenantId"; const kDbName = tenantMigrationTest.tenantDB(kTenantId, "testDb"); diff --git a/jstests/replsets/tenant_migrations_noop_writes.js b/jstests/replsets/tenant_migrations_noop_writes.js index 37a866d16b3..0acb99c6263 100644 --- a/jstests/replsets/tenant_migrations_noop_writes.js +++ b/jstests/replsets/tenant_migrations_noop_writes.js @@ -94,10 +94,6 @@ recipientRst.startSet(); recipientRst.initiate(); const tmt = new TenantMigrationTest({name: jsTestName(), donorRst, recipientRst}); -if (!tmt.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; -} const donorPrimary = tmt.getDonorPrimary(); const recipientPrimary = tmt.getRecipientPrimary(); diff --git a/jstests/replsets/tenant_migrations_transaction_with_create_collection.js b/jstests/replsets/tenant_migrations_transaction_with_create_collection.js index 71c8f4bc7a3..e59cb32cb5f 100644 --- a/jstests/replsets/tenant_migrations_transaction_with_create_collection.js +++ b/jstests/replsets/tenant_migrations_transaction_with_create_collection.js @@ -20,10 +20,6 @@ load("jstests/libs/uuid_util.js"); load("jstests/replsets/libs/tenant_migration_test.js"); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName()}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - return; -} const tenantId = "testTenantId"; const tenantDB = tenantMigrationTest.tenantDB(tenantId, "testDB"); diff --git a/jstests/sharding/tenant_migration_disallowed_in_sharded_cluster.js b/jstests/sharding/tenant_migration_disallowed_in_sharded_cluster.js index 7b5e3922853..44540cbd051 100644 --- a/jstests/sharding/tenant_migration_disallowed_in_sharded_cluster.js +++ b/jstests/sharding/tenant_migration_disallowed_in_sharded_cluster.js @@ -24,13 +24,6 @@ recipientRst.initiate(); const tenantMigrationTest = new TenantMigrationTest({name: jsTestName(), donorRst: donorRstShard, recipientRst}); -if (!tenantMigrationTest.isFeatureFlagEnabled()) { - jsTestLog("Skipping test because the tenant migrations feature flag is disabled"); - st.stop(); - recipientRst.stopSet(); - return; -} - // Run tenant migration commands on shards. let donorPrimary = donorRstShard.getPrimary(); diff --git a/src/mongo/db/commands/tenant_migration_donor_cmds.cpp b/src/mongo/db/commands/tenant_migration_donor_cmds.cpp index c81e5a551e1..a30103d7e76 100644 --- a/src/mongo/db/commands/tenant_migration_donor_cmds.cpp +++ b/src/mongo/db/commands/tenant_migration_donor_cmds.cpp @@ -56,11 +56,6 @@ public: using InvocationBase::InvocationBase; Response typedRun(OperationContext* opCtx) { - uassert(ErrorCodes::CommandNotSupported, - "donorStartMigration command not enabled", - repl::feature_flags::gTenantMigrations.isEnabled( - serverGlobalParams.featureCompatibility)); - uassert(ErrorCodes::IllegalOperation, "tenant migrations are not available in sharded clusters", serverGlobalParams.clusterRole == ClusterRole::None); @@ -170,11 +165,6 @@ public: using InvocationBase::InvocationBase; void typedRun(OperationContext* opCtx) { - uassert(ErrorCodes::CommandNotSupported, - "donorForgetMigration command not enabled", - repl::feature_flags::gTenantMigrations.isEnabled( - serverGlobalParams.featureCompatibility)); - uassert(ErrorCodes::IllegalOperation, "tenant migrations are not available in sharded clusters", serverGlobalParams.clusterRole == ClusterRole::None); @@ -243,11 +233,6 @@ public: using InvocationBase::InvocationBase; void typedRun(OperationContext* opCtx) { - uassert(ErrorCodes::CommandNotSupported, - "donorAbortMigration command not enabled", - repl::feature_flags::gTenantMigrations.isEnabled( - serverGlobalParams.featureCompatibility)); - uassert(ErrorCodes::IllegalOperation, "tenant migrations are not available in sharded clusters", serverGlobalParams.clusterRole == ClusterRole::None); diff --git a/src/mongo/db/commands/tenant_migration_recipient_cmds.cpp b/src/mongo/db/commands/tenant_migration_recipient_cmds.cpp index e4358c99bdd..b18f5b4c013 100644 --- a/src/mongo/db/commands/tenant_migration_recipient_cmds.cpp +++ b/src/mongo/db/commands/tenant_migration_recipient_cmds.cpp @@ -58,11 +58,6 @@ public: using InvocationBase::InvocationBase; Response typedRun(OperationContext* opCtx) { - uassert(ErrorCodes::CommandNotSupported, - "recipientSyncData command not enabled", - repl::feature_flags::gTenantMigrations.isEnabled( - serverGlobalParams.featureCompatibility)); - uassert(ErrorCodes::IllegalOperation, "tenant migrations are not available in sharded clusters", serverGlobalParams.clusterRole == ClusterRole::None); @@ -179,11 +174,6 @@ public: using InvocationBase::InvocationBase; void typedRun(OperationContext* opCtx) { - uassert(ErrorCodes::CommandNotSupported, - "recipientForgetMigration command not enabled", - repl::feature_flags::gTenantMigrations.isEnabled( - serverGlobalParams.featureCompatibility)); - uassert(ErrorCodes::IllegalOperation, "tenant migrations are not available in sharded clusters", serverGlobalParams.clusterRole == ClusterRole::None); diff --git a/src/mongo/db/repl/oplog.cpp b/src/mongo/db/repl/oplog.cpp index 89e6e1193bb..4d50cb7e241 100644 --- a/src/mongo/db/repl/oplog.cpp +++ b/src/mongo/db/repl/oplog.cpp @@ -343,13 +343,10 @@ void _logOpsInner(OperationContext* opCtx, // across databases, but a tenant will never be able to rename into a database with a different // prefix, so it is safe to use the fromCollection's db's prefix for this check. // - // We ignore FCV here when checking the feature flag since the FCV may not have been initialized - // yet. This is safe since tenant migrations does not have any upgrade/downgrade behavior. - // // Skip the check if this is an "abortIndexBuild" oplog entry since it is safe to the abort an // index build on the donor after the blockTimestamp, plus if an index build fails to commit due // to TenantMigrationConflict, we need to be able to abort the index build and clean up. - if (repl::feature_flags::gTenantMigrations.isEnabledAndIgnoreFCV() && !isAbortIndexBuild) { + if (!isAbortIndexBuild) { tenant_migration_access_blocker::checkIfCanWriteOrThrow(opCtx, nss.db(), timestamps.back()); } diff --git a/src/mongo/db/repl/repl_server_parameters.idl b/src/mongo/db/repl/repl_server_parameters.idl index de92709ad49..e104bf67201 100644 --- a/src/mongo/db/repl/repl_server_parameters.idl +++ b/src/mongo/db/repl/repl_server_parameters.idl @@ -536,13 +536,6 @@ server_parameters: default: "logical" feature_flags: - featureFlagTenantMigrations: - description: >- - When enabled, tenant migration commands are supported. - cpp_varname: feature_flags::gTenantMigrations - default: true - version: 4.9 - # TODO (SERVER-54730): Remove featureFlagUseSecondaryDelaySecs. featureFlagUseSecondaryDelaySecs: description: >-