summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXueruiFa <xuerui.fa@mongodb.com>2022-04-13 20:13:01 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-04-18 20:06:09 +0000
commite8bfbec95126517ff3cdf92e9faaa10dd00bdb4c (patch)
treefaaf683a4d7d187de58dfedc7ab35db1d855ad1f
parentde94da75ce410da2af885f1d682628de83282051 (diff)
downloadmongo-e8bfbec95126517ff3cdf92e9faaa10dd00bdb4c.tar.gz
SERVER-65585: Prepare tests for FCV upgrade
-rw-r--r--buildscripts/resmokeconfig/matrix_suites/overrides/multiversion.yml6
-rw-r--r--buildscripts/resmokeconfig/suites/auth_audit.yml2
-rw-r--r--buildscripts/resmokeconfig/suites/concurrency_simultaneous.yml1
-rw-r--r--buildscripts/resmokeconfig/suites/multiversion.yml3
-rw-r--r--buildscripts/resmokeconfig/suites/multiversion_auth.yml3
-rw-r--r--buildscripts/resmokeconfig/suites/no_passthrough.yml2
-rw-r--r--buildscripts/resmokeconfig/suites/replica_sets.yml2
-rw-r--r--buildscripts/resmokeconfig/suites/replica_sets_auth.yml2
-rw-r--r--buildscripts/resmokeconfig/suites/replica_sets_ese.yml1
-rw-r--r--buildscripts/resmokeconfig/suites/replica_sets_ese_gcm.yml1
-rw-r--r--buildscripts/resmokeconfig/suites/replica_sets_initsync_static_jscore_passthrough.yml1
-rw-r--r--buildscripts/resmokeconfig/suites/replica_sets_large_txns_format.yml1
-rw-r--r--buildscripts/resmokeconfig/suites/replica_sets_max_mirroring.yml2
-rw-r--r--buildscripts/resmokeconfig/suites/replica_sets_update_v1_oplog.yml2
-rw-r--r--buildscripts/resmokeconfig/suites/sharding_last_lts_mongos_and_mixed_shards.yml2
-rw-r--r--jstests/multiVersion/genericBinVersion/timeseries_collection_mixed_type.js2
-rw-r--r--jstests/multiVersion/genericSetFCVUsage/major_version_upgrade.js2
-rw-r--r--jstests/multiVersion/genericSetFCVUsage/upgrade_downgrade_timeseries_collection_from_last_continuous.js2
-rw-r--r--jstests/multiVersion/targetedTestsLastLtsFeatures/cluster_parameter_feature_flags.js89
-rw-r--r--jstests/multiVersion/targetedTestsLastLtsFeatures/fix_invalid_index_options.js74
-rw-r--r--jstests/noPassthrough/timeseries_measurement_indexes_downgrade.js150
-rw-r--r--jstests/noPassthrough/user_write_block_fcv.js1
-rw-r--r--src/mongo/util/version/releases.yml2
23 files changed, 17 insertions, 336 deletions
diff --git a/buildscripts/resmokeconfig/matrix_suites/overrides/multiversion.yml b/buildscripts/resmokeconfig/matrix_suites/overrides/multiversion.yml
index c6e5b98a4fe..d2299540bc7 100644
--- a/buildscripts/resmokeconfig/matrix_suites/overrides/multiversion.yml
+++ b/buildscripts/resmokeconfig/matrix_suites/overrides/multiversion.yml
@@ -109,6 +109,8 @@
# Skip any tests that run with auth explicitly.
- jstests/multiVersion/genericBinVersion/load_keys_on_upgrade.js
+ exclude_with_any_tags:
+ - disabled_for_fcv_6_1_upgrade
- name: multiversion_sanity_check_selector
value:
@@ -125,7 +127,7 @@
- multiversion_incompatible
- backport_required_multiversion
- replica_sets_multiversion_backport_required_multiversion
- - disabled_due_to_server_60490
+ - disabled_for_fcv_6_1_upgrade
exclude_files:
- jstests/replsets/initial_sync_rename_collection.js
- jstests/replsets/initial_sync_drop_collection.js
@@ -194,7 +196,7 @@
- multiversion_incompatible
- backport_required_multiversion
- replica_sets_multiversion_backport_required_multiversion
- - disabled_due_to_server_60490
+ - disabled_for_fcv_6_1_upgrade
exclude_files:
- jstests/sharding/**/libs/**/*.js
# Enable when 4.6 becomes last stable
diff --git a/buildscripts/resmokeconfig/suites/auth_audit.yml b/buildscripts/resmokeconfig/suites/auth_audit.yml
index 91fdb6b3615..5b5a0c507ae 100644
--- a/buildscripts/resmokeconfig/suites/auth_audit.yml
+++ b/buildscripts/resmokeconfig/suites/auth_audit.yml
@@ -6,8 +6,6 @@ selector:
exclude_files:
# Skip until SERVER-25618 is resolved.
- jstests/auth/repl.js
- exclude_with_any_tags:
- - disabled_due_to_server_61671
# Auth tests start their own mongod's.
executor:
diff --git a/buildscripts/resmokeconfig/suites/concurrency_simultaneous.yml b/buildscripts/resmokeconfig/suites/concurrency_simultaneous.yml
index 4e5f0e97357..1caa8debaa8 100644
--- a/buildscripts/resmokeconfig/suites/concurrency_simultaneous.yml
+++ b/buildscripts/resmokeconfig/suites/concurrency_simultaneous.yml
@@ -39,7 +39,6 @@ selector:
- uses_transactions
- requires_replication
- requires_sharding
- - disabled_due_to_server_61671
group_size: 10
group_count_multiplier: 2.5
diff --git a/buildscripts/resmokeconfig/suites/multiversion.yml b/buildscripts/resmokeconfig/suites/multiversion.yml
index 674aabc6a65..e880fc8923b 100644
--- a/buildscripts/resmokeconfig/suites/multiversion.yml
+++ b/buildscripts/resmokeconfig/suites/multiversion.yml
@@ -20,8 +20,7 @@ selector:
exclude_with_any_tags:
- featureFlagToaster
- featureFlagSpoon
- - disabled_due_to_server_60490
- - disabled_due_to_server_61671
+ - disabled_for_fcv_6_1_upgrade
# Multiversion tests start their own mongod's.
executor:
diff --git a/buildscripts/resmokeconfig/suites/multiversion_auth.yml b/buildscripts/resmokeconfig/suites/multiversion_auth.yml
index d76515abf50..a7036a45522 100644
--- a/buildscripts/resmokeconfig/suites/multiversion_auth.yml
+++ b/buildscripts/resmokeconfig/suites/multiversion_auth.yml
@@ -28,8 +28,7 @@ selector:
exclude_with_any_tags:
- featureFlagToaster
- featureFlagSpoon
- - disabled_due_to_server_60490
- - disabled_due_to_server_61671
+ - disabled_for_fcv_6_1_upgrade
# Multiversion tests start their own mongod's.
executor:
diff --git a/buildscripts/resmokeconfig/suites/no_passthrough.yml b/buildscripts/resmokeconfig/suites/no_passthrough.yml
index 7ab97e1f2ff..f00918f5628 100644
--- a/buildscripts/resmokeconfig/suites/no_passthrough.yml
+++ b/buildscripts/resmokeconfig/suites/no_passthrough.yml
@@ -12,6 +12,8 @@ selector:
exclude_files:
# Disable inmem_full as per SERVER-27014
- jstests/noPassthrough/inmem_full.js
+ exclude_with_any_tags:
+ - disabled_for_fcv_6_1_upgrade
# noPassthrough tests start their own mongod's.
executor:
diff --git a/buildscripts/resmokeconfig/suites/replica_sets.yml b/buildscripts/resmokeconfig/suites/replica_sets.yml
index 08672013e4c..cdaf2b828ef 100644
--- a/buildscripts/resmokeconfig/suites/replica_sets.yml
+++ b/buildscripts/resmokeconfig/suites/replica_sets.yml
@@ -5,8 +5,6 @@ selector:
- jstests/replsets/*.js
- src/mongo/db/modules/enterprise/jstests/fcbis/*.js
exclude_files:
- exclude_with_any_tags:
- - disabled_due_to_server_61671
executor:
config:
diff --git a/buildscripts/resmokeconfig/suites/replica_sets_auth.yml b/buildscripts/resmokeconfig/suites/replica_sets_auth.yml
index 4f6556e1083..13b74c3f91a 100644
--- a/buildscripts/resmokeconfig/suites/replica_sets_auth.yml
+++ b/buildscripts/resmokeconfig/suites/replica_sets_auth.yml
@@ -29,8 +29,6 @@ selector:
- jstests/replsets/transactions_committed_with_tickets_exhausted.js
# This test disables test commands which is incompatible with this suite.
- jstests/replsets/test_only_repl_commands.js
- exclude_with_any_tags:
- - disabled_due_to_server_61671
executor:
config:
diff --git a/buildscripts/resmokeconfig/suites/replica_sets_ese.yml b/buildscripts/resmokeconfig/suites/replica_sets_ese.yml
index ceb21aa094e..cec83f33cc6 100644
--- a/buildscripts/resmokeconfig/suites/replica_sets_ese.yml
+++ b/buildscripts/resmokeconfig/suites/replica_sets_ese.yml
@@ -10,7 +10,6 @@ selector:
- src/mongo/db/modules/enterprise/jstests/fcbis/*.js
exclude_with_any_tags:
- does_not_support_encrypted_storage_engine
- - disabled_due_to_server_61671
# Shard merge protocol won't work with encrypted storage engines.
- serverless
executor:
diff --git a/buildscripts/resmokeconfig/suites/replica_sets_ese_gcm.yml b/buildscripts/resmokeconfig/suites/replica_sets_ese_gcm.yml
index a333024c529..5ad50811b58 100644
--- a/buildscripts/resmokeconfig/suites/replica_sets_ese_gcm.yml
+++ b/buildscripts/resmokeconfig/suites/replica_sets_ese_gcm.yml
@@ -10,7 +10,6 @@ selector:
- src/mongo/db/modules/enterprise/jstests/fcbis/*.js
exclude_with_any_tags:
- does_not_support_encrypted_storage_engine
- - disabled_due_to_server_61671
# Shard merge protocol won't work with encrypted storage engines.
- serverless
executor:
diff --git a/buildscripts/resmokeconfig/suites/replica_sets_initsync_static_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/replica_sets_initsync_static_jscore_passthrough.yml
index 1295ba29190..2cb2edbe66a 100644
--- a/buildscripts/resmokeconfig/suites/replica_sets_initsync_static_jscore_passthrough.yml
+++ b/buildscripts/resmokeconfig/suites/replica_sets_initsync_static_jscore_passthrough.yml
@@ -11,7 +11,6 @@ selector:
exclude_with_any_tags:
- assumes_standalone_mongod
- - disabled_due_to_server_61671
run_hook_interval: &run_hook_interval 20
executor:
diff --git a/buildscripts/resmokeconfig/suites/replica_sets_large_txns_format.yml b/buildscripts/resmokeconfig/suites/replica_sets_large_txns_format.yml
index 758aa1638e1..f7d2966e471 100644
--- a/buildscripts/resmokeconfig/suites/replica_sets_large_txns_format.yml
+++ b/buildscripts/resmokeconfig/suites/replica_sets_large_txns_format.yml
@@ -6,7 +6,6 @@ selector:
exclude_with_any_tags:
# Transactions are not allowed to operate on capped collections.
- requires_capped
- - disabled_due_to_server_61671
exclude_files:
executor:
diff --git a/buildscripts/resmokeconfig/suites/replica_sets_max_mirroring.yml b/buildscripts/resmokeconfig/suites/replica_sets_max_mirroring.yml
index 469d97df635..a871411297b 100644
--- a/buildscripts/resmokeconfig/suites/replica_sets_max_mirroring.yml
+++ b/buildscripts/resmokeconfig/suites/replica_sets_max_mirroring.yml
@@ -4,8 +4,6 @@ selector:
roots:
- jstests/replsets/*.js
exclude_files:
- exclude_with_any_tags:
- - disabled_due_to_server_61671
executor:
config:
diff --git a/buildscripts/resmokeconfig/suites/replica_sets_update_v1_oplog.yml b/buildscripts/resmokeconfig/suites/replica_sets_update_v1_oplog.yml
index 0fc37bb2009..0d1dd1a5a57 100644
--- a/buildscripts/resmokeconfig/suites/replica_sets_update_v1_oplog.yml
+++ b/buildscripts/resmokeconfig/suites/replica_sets_update_v1_oplog.yml
@@ -8,8 +8,6 @@ selector:
- jstests/replsets/v2_delta_oplog_entries.js
- jstests/replsets/rollback_with_coalesced_txn_table_updates_during_oplog_application.js
- jstests/replsets/tenant_migration_recipient_fetches_retryable_writes_entry_after_committed_snapshot.js
- exclude_with_any_tags:
- - disabled_due_to_server_61671
executor:
config:
diff --git a/buildscripts/resmokeconfig/suites/sharding_last_lts_mongos_and_mixed_shards.yml b/buildscripts/resmokeconfig/suites/sharding_last_lts_mongos_and_mixed_shards.yml
index b6c6ee03bab..0aeb1e36219 100644
--- a/buildscripts/resmokeconfig/suites/sharding_last_lts_mongos_and_mixed_shards.yml
+++ b/buildscripts/resmokeconfig/suites/sharding_last_lts_mongos_and_mixed_shards.yml
@@ -8,8 +8,6 @@ selector:
# - jstests/sharding/**/*.js
- jstests/sharding/query/*.js
- jstests/sharding/change_streams/*.js
- exclude_with_any_tags:
- - disabled_due_to_server_60490
exclude_files:
# SERVER-33683: We added a restriction on using an aggregation within a transaction against
# mongos. This should be removed and the test can be adjusted and re-added to this passthrough.
diff --git a/jstests/multiVersion/genericBinVersion/timeseries_collection_mixed_type.js b/jstests/multiVersion/genericBinVersion/timeseries_collection_mixed_type.js
index 4e94668a46f..f4e9203642e 100644
--- a/jstests/multiVersion/genericBinVersion/timeseries_collection_mixed_type.js
+++ b/jstests/multiVersion/genericBinVersion/timeseries_collection_mixed_type.js
@@ -1,6 +1,8 @@
/**
* Test that variable-type fields are found correctly in upgraded timeseries collections with dirty
* data.
+ *
+ * @tags: [disabled_for_fcv_6_1_upgrade]
*/
(function() {
diff --git a/jstests/multiVersion/genericSetFCVUsage/major_version_upgrade.js b/jstests/multiVersion/genericSetFCVUsage/major_version_upgrade.js
index a8a7f51b5d6..0f6f67c7ef1 100644
--- a/jstests/multiVersion/genericSetFCVUsage/major_version_upgrade.js
+++ b/jstests/multiVersion/genericSetFCVUsage/major_version_upgrade.js
@@ -7,6 +7,8 @@
* - Create a new collection.
* - Insert a document into the new collection.
* - Create an index on the new collection.
+ *
+ * @tags: [disabled_for_fcv_6_1_upgrade]
*/
(function() {
diff --git a/jstests/multiVersion/genericSetFCVUsage/upgrade_downgrade_timeseries_collection_from_last_continuous.js b/jstests/multiVersion/genericSetFCVUsage/upgrade_downgrade_timeseries_collection_from_last_continuous.js
index 7cc10f5080e..ee0a3961361 100644
--- a/jstests/multiVersion/genericSetFCVUsage/upgrade_downgrade_timeseries_collection_from_last_continuous.js
+++ b/jstests/multiVersion/genericSetFCVUsage/upgrade_downgrade_timeseries_collection_from_last_continuous.js
@@ -1,6 +1,8 @@
/**
* Tests that there are no upgrade or downgrade requirements for secondary indexes on time-series
* measurements between kLastContinuous and kLatest.
+ *
+ * @tags: [disabled_for_fcv_6_1_upgrade]
*/
(function() {
"use strict";
diff --git a/jstests/multiVersion/targetedTestsLastLtsFeatures/cluster_parameter_feature_flags.js b/jstests/multiVersion/targetedTestsLastLtsFeatures/cluster_parameter_feature_flags.js
deleted file mode 100644
index 2c06dfc2411..00000000000
--- a/jstests/multiVersion/targetedTestsLastLtsFeatures/cluster_parameter_feature_flags.js
+++ /dev/null
@@ -1,89 +0,0 @@
-/**
- * Tests that cluster server parameter feature flags work correctly.
- *
- * TODO: Delete this test once we branch for 6.0.
- *
- * @tags: [requires_replication, requires_sharding]
- */
-
-(function() {
-"use strict";
-
-load("jstests/multiVersion/libs/verify_versions.js");
-load("jstests/multiVersion/libs/multi_rs.js"); // For upgradeSecondaries and upgradeSet.
-load("jstests/multiVersion/libs/multi_cluster.js"); // For upgradeCluster.
-
-const kDowngradeVersion = "last-lts";
-const kUpgradeVersion = "latest";
-
-function assertSetClusterParameterFailsAndthenSucceedsAfterFCVUpgrade(db) {
- // Despite an upgrade, the test shouldn't pass because the FCV has not been explicitly set.
- assert.commandFailedWithCode(
- db.runCommand({setClusterParameter: {testStrClusterParameter: {strData: "ok"}}}),
- ErrorCodes.IllegalOperation);
-
- // Set the FCV; the test should now pass.
- assert.commandWorked(
- db.runCommand({setFeatureCompatibilityVersion: binVersionToFCV(kUpgradeVersion)}));
- assert.commandWorked(
- db.runCommand({setClusterParameter: {testStrClusterParameter: {strData: "ok"}}}));
-}
-
-function assertSetClusterParameterFailsInDowngradedVersion(db) {
- assert.commandFailedWithCode(
- db.runCommand({setClusterParameter: {testStrClusterParameter: {strData: "ok"}}}),
- ErrorCodes.CommandNotFound);
-}
-
-function replicaSetClusterParameterIsFCVGated() {
- const dbName = "admin";
-
- // Set up a replica-set in a 'downgraded' version.
- const rst = new ReplSetTest({nodes: 2, nodeOptions: {binVersion: kDowngradeVersion}});
- rst.startSet();
- rst.initiate();
-
- assertSetClusterParameterFailsInDowngradedVersion(rst.getPrimary().getDB(dbName));
-
- // Upgrade the replica set.
- rst.upgradeSet({binVersion: kUpgradeVersion});
-
- // Verify that all nodes are in the latest version.
- for (const node of rst.nodes) {
- assert.binVersion(node, kUpgradeVersion);
- }
-
- rst.awaitNodesAgreeOnPrimary();
-
- assertSetClusterParameterFailsAndthenSucceedsAfterFCVUpgrade(rst.getPrimary().getDB(dbName));
-
- rst.stopSet();
-}
-
-function shardedClusterParameterIsFCVGated() {
- const dbName = "admin";
-
- // Set up a sharded cluster in a 'downgraded' version.
- const st = new ShardingTest({
- shards: 2,
- rs: {nodes: 2, binVersion: kDowngradeVersion},
- other: {
- mongosOptions: {binVersion: kDowngradeVersion},
- configOptions: {binVersion: kDowngradeVersion}
- }
- });
-
- // Sanity check: setClusterParameter shouldn't pass in 'downgraded' version.
- assertSetClusterParameterFailsInDowngradedVersion(st.s.getDB(dbName));
-
- // Upgrade the cluster.
- st.upgradeCluster(kUpgradeVersion, {waitUntilStable: true});
-
- assertSetClusterParameterFailsAndthenSucceedsAfterFCVUpgrade(st.s.getDB(dbName));
-
- st.stop();
-}
-
-replicaSetClusterParameterIsFCVGated();
-shardedClusterParameterIsFCVGated();
-})();
diff --git a/jstests/multiVersion/targetedTestsLastLtsFeatures/fix_invalid_index_options.js b/jstests/multiVersion/targetedTestsLastLtsFeatures/fix_invalid_index_options.js
deleted file mode 100644
index d4810a083c3..00000000000
--- a/jstests/multiVersion/targetedTestsLastLtsFeatures/fix_invalid_index_options.js
+++ /dev/null
@@ -1,74 +0,0 @@
-/**
- * Tests that in 6.0 version collMod fixes invalid index specs created before 5.0 version.
- *
- * @tags: [requires_replication]
- */
-(function() {
-"use strict";
-
-load('jstests/multiVersion/libs/multi_rs.js');
-
-var nodes = {
- n1: {binVersion: "4.4"},
- n2: {binVersion: "4.4"},
-};
-
-var rst = new ReplSetTest({nodes: nodes});
-rst.startSet();
-rst.initiate();
-
-const dbName = "test";
-const collName = jsTestName();
-
-let primaryDB = rst.getPrimary().getDB(dbName);
-let primaryColl = primaryDB.getCollection(collName);
-
-let secondaryDB = rst.getSecondary().getDB(dbName);
-
-// In earlier versions, users were able to add invalid index options when creating an index.
-assert.commandWorked(primaryColl.createIndex({x: 1}, {sparse: "yes"}));
-
-// Upgrades from 4.4 to 5.0.
-jsTestLog("Upgrading to version last-lts");
-rst.upgradeSet({binVersion: "last-lts"});
-assert.commandWorked(rst.getPrimary().adminCommand({setFeatureCompatibilityVersion: lastLTSFCV}));
-
-// Upgrades from 5.0 to 6.0.
-jsTestLog("Upgrading to version latest");
-rst.upgradeSet({binVersion: "latest"});
-const primary = rst.getPrimary();
-const secondary = rst.getSecondary();
-assert.commandWorked(primary.adminCommand({setFeatureCompatibilityVersion: latestFCV}));
-
-primaryDB = primary.getDB(dbName);
-secondaryDB = secondary.getDB(dbName);
-
-// Verify that the primary and secondary in 6.0 detect invalid index options.
-// With invalid index options, listIndexes command will fail, affecting server operations like
-// initial sync.
-assert.commandFailedWithCode(primaryDB.runCommand({listIndexes: collName}), 5254501);
-
-let validateRes = assert.commandWorked(primaryDB.runCommand({validate: collName}));
-assert(!validateRes.valid, "validate should fail: " + tojson(validateRes));
-
-validateRes = assert.commandWorked(secondaryDB.runCommand({validate: collName}));
-assert(!validateRes.valid, "validate should fail: " + tojson(validateRes));
-
-// Use collMod to fix the invalid index options in the collection.
-assert.commandWorked(primaryDB.runCommand({collMod: collName}));
-
-// Fix invalid field from index spec.
-checkLog.containsJson(primary, 6444400, {fieldName: "sparse"});
-checkLog.containsJson(secondary, 6444400, {fieldName: "sparse"});
-
-// Verify that the index no longer has invalid index options.
-assert.commandWorked(primaryDB.runCommand({listIndexes: collName}));
-
-validateRes = assert.commandWorked(primaryDB.runCommand({validate: collName}));
-assert(validateRes.valid, "validate should succeed: " + tojson(validateRes));
-
-validateRes = assert.commandWorked(secondaryDB.runCommand({validate: collName}));
-assert(validateRes.valid, "validate should succeed: " + tojson(validateRes));
-
-rst.stopSet();
-})();
diff --git a/jstests/noPassthrough/timeseries_measurement_indexes_downgrade.js b/jstests/noPassthrough/timeseries_measurement_indexes_downgrade.js
deleted file mode 100644
index 8ada752669a..00000000000
--- a/jstests/noPassthrough/timeseries_measurement_indexes_downgrade.js
+++ /dev/null
@@ -1,150 +0,0 @@
-/**
- * Tests that the cluster cannot be downgraded when there are secondary indexes on time-series
- * measurements present. Additionally, this verifies that only indexes that are incompatible for
- * downgrade have the "originalSpec" field present on the buckets index definition.
- *
- * TODO SERVER-60912: Remove this test once kLastLTS is 6.0.
- */
-(function() {
-"use strict";
-
-load("jstests/core/timeseries/libs/timeseries.js");
-
-const conn = MongoRunner.runMongod();
-const db = conn.getDB("test");
-
-if (!TimeseriesTest.timeseriesMetricIndexesEnabled(db.getMongo())) {
- jsTestLog(
- "Skipped test as the featureFlagTimeseriesMetricIndexes feature flag is not enabled.");
- MongoRunner.stopMongod(conn);
- return;
-}
-
-const collName = "timeseries_measurement_indexes_downgrade";
-const coll = db.getCollection(collName);
-const bucketsColl = db.getCollection("system.buckets." + collName);
-
-const timeFieldName = "tm";
-const metaFieldName = "mm";
-
-assert.commandWorked(db.createCollection("regular"));
-assert.commandWorked(db.createCollection("system.buckets.abc"));
-
-assert.commandWorked(db.createCollection(
- coll.getName(), {timeseries: {timeField: timeFieldName, metaField: metaFieldName}}));
-
-function checkIndexForDowngrade(withFCV, isCompatible, createdOnBucketsCollection) {
- const index = bucketsColl.getIndexes()[0];
-
- if (isCompatible) {
- // All time-series indexes are downgrade compatible to the last continuous FCV as of v5.3.
- if (withFCV != lastContinuousFCV) {
- assert(!index.hasOwnProperty("originalSpec"));
- }
- } else {
- if (createdOnBucketsCollection) {
- // Indexes created directly on the buckets collection do not have the original user
- // index definition.
- assert(!index.hasOwnProperty("originalSpec"));
- } else {
- assert(index.hasOwnProperty("originalSpec"));
- }
-
- assert.commandFailedWithCode(db.adminCommand({setFeatureCompatibilityVersion: withFCV}),
- ErrorCodes.CannotDowngrade);
- assert.commandWorked(coll.dropIndexes("*"));
- }
-
- assert.commandWorked(db.adminCommand({setFeatureCompatibilityVersion: withFCV}));
- assert.commandWorked(db.adminCommand({setFeatureCompatibilityVersion: latestFCV}));
-
- assert.commandWorked(coll.dropIndexes("*"));
-}
-
-assert.commandWorked(coll.createIndex({[timeFieldName]: 1}));
-checkIndexForDowngrade(lastLTSFCV, true, false);
-
-assert.commandWorked(coll.createIndex({[timeFieldName]: 1}));
-checkIndexForDowngrade(lastContinuousFCV, true, false);
-
-assert.commandWorked(coll.createIndex({[metaFieldName]: 1}));
-checkIndexForDowngrade(lastLTSFCV, true, false);
-
-assert.commandWorked(coll.createIndex({[metaFieldName]: 1}));
-checkIndexForDowngrade(lastContinuousFCV, true, false);
-
-assert.commandWorked(coll.createIndex({[metaFieldName]: 1, a: 1}));
-checkIndexForDowngrade(lastLTSFCV, false, false);
-
-assert.commandWorked(coll.createIndex({[metaFieldName]: 1, a: 1}));
-checkIndexForDowngrade(lastContinuousFCV, true, false);
-
-assert.commandWorked(coll.createIndex({b: 1}));
-checkIndexForDowngrade(lastLTSFCV, false, false);
-
-assert.commandWorked(coll.createIndex({b: 1}));
-checkIndexForDowngrade(lastContinuousFCV, true, false);
-
-assert.commandWorked(bucketsColl.createIndex({"control.min.c.d": 1, "control.max.c.d": 1}));
-checkIndexForDowngrade(lastLTSFCV, false, true);
-
-assert.commandWorked(bucketsColl.createIndex({"control.min.c.d": 1, "control.max.c.d": 1}));
-checkIndexForDowngrade(lastContinuousFCV, true, true);
-
-assert.commandWorked(bucketsColl.createIndex({"control.min.e": 1, "control.min.f": 1}));
-checkIndexForDowngrade(lastLTSFCV, false, true);
-
-assert.commandWorked(bucketsColl.createIndex({"control.min.e": 1, "control.min.f": 1}));
-checkIndexForDowngrade(lastContinuousFCV, true, true);
-
-assert.commandWorked(coll.createIndex({g: "2dsphere"}));
-checkIndexForDowngrade(lastLTSFCV, false, false);
-
-assert.commandWorked(coll.createIndex({g: "2dsphere"}));
-checkIndexForDowngrade(lastContinuousFCV, true, false);
-
-assert.commandWorked(coll.createIndex({[metaFieldName]: "2d"}));
-checkIndexForDowngrade(lastLTSFCV, true, false);
-
-assert.commandWorked(coll.createIndex({[metaFieldName]: "2d"}));
-checkIndexForDowngrade(lastContinuousFCV, true, false);
-
-assert.commandWorked(coll.createIndex({[metaFieldName]: "2dsphere"}));
-checkIndexForDowngrade(lastLTSFCV, true, false);
-
-assert.commandWorked(coll.createIndex({[metaFieldName]: "2dsphere"}));
-checkIndexForDowngrade(lastContinuousFCV, true, false);
-
-// Partial indexes are not supported in versions earlier than v5.2.
-assert.commandWorked(
- coll.createIndex({[timeFieldName]: 1}, {partialFilterExpression: {x: {$gt: 5}}}));
-checkIndexForDowngrade(lastLTSFCV, false, false);
-
-assert.commandWorked(
- coll.createIndex({[timeFieldName]: 1}, {partialFilterExpression: {x: {$gt: 5}}}));
-checkIndexForDowngrade(lastContinuousFCV, true, false);
-
-assert.commandWorked(
- coll.createIndex({[metaFieldName]: 1}, {partialFilterExpression: {x: {$gt: 5}}}));
-checkIndexForDowngrade(lastLTSFCV, false, false);
-
-assert.commandWorked(
- coll.createIndex({[metaFieldName]: 1}, {partialFilterExpression: {x: {$gt: 5}}}));
-checkIndexForDowngrade(lastContinuousFCV, true, false);
-
-assert.commandWorked(coll.createIndex({x: 1}, {partialFilterExpression: {x: {$gt: 5}}}));
-checkIndexForDowngrade(lastLTSFCV, false, false);
-
-assert.commandWorked(coll.createIndex({x: 1}, {partialFilterExpression: {x: {$gt: 5}}}));
-checkIndexForDowngrade(lastContinuousFCV, true, false);
-
-assert.commandWorked(
- coll.createIndex({[metaFieldName]: 1, x: 1}, {partialFilterExpression: {x: {$gt: 5}}}));
-checkIndexForDowngrade(lastLTSFCV, false, false);
-
-assert.commandWorked(
- coll.createIndex({x: 1, [metaFieldName]: 1}, {partialFilterExpression: {x: {$gt: 5}}}));
-checkIndexForDowngrade(lastContinuousFCV, true, false);
-
-MongoRunner.stopMongod(conn);
-}());
diff --git a/jstests/noPassthrough/user_write_block_fcv.js b/jstests/noPassthrough/user_write_block_fcv.js
index 626c4cb6f1e..c9390d316f1 100644
--- a/jstests/noPassthrough/user_write_block_fcv.js
+++ b/jstests/noPassthrough/user_write_block_fcv.js
@@ -6,6 +6,7 @@
// requires_fcv_60,
// requires_non_retryable_commands,
// requires_replication,
+// disabled_for_fcv_6_1_upgrade,
// ]
load("jstests/noPassthrough/libs/user_write_blocking.js");
diff --git a/src/mongo/util/version/releases.yml b/src/mongo/util/version/releases.yml
index 51a956ee93b..3889a2264a7 100644
--- a/src/mongo/util/version/releases.yml
+++ b/src/mongo/util/version/releases.yml
@@ -16,6 +16,7 @@ featureCompatibilityVersions:
- "5.2"
- "5.3"
- "6.0"
+ - "6.1"
- "100.0" # This version is not an actual version and used for testing only
# All LTS releases starting with 4.0.
longTermSupportReleases:
@@ -23,6 +24,7 @@ longTermSupportReleases:
- "4.2"
- "4.4"
- "5.0"
+ - "6.0"
# Optional.
# Using this special override extends FCV constant generation down to the previous value of