summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--buildscripts/resmokeconfig/suites/sharding_last_lts_mongos_and_mixed_shards.yml2
-rw-r--r--buildscripts/resmokelib/multiversionconstants.py2
-rw-r--r--jstests/core/apply_ops1.js2
-rw-r--r--jstests/core/covered_index_sort_no_fetch_optimization.js2
-rw-r--r--jstests/core/expr.js2
-rw-r--r--jstests/core/fts_find_and_modify.js2
-rw-r--r--jstests/core/hashed_index_sort.js2
-rw-r--r--jstests/core/index_signature.js5
-rw-r--r--jstests/multiVersion/allow_system_views_user_writes_in_fcv_44.js4
-rw-r--r--jstests/multiVersion/genericSetFCVUsage/major_version_upgrade.js2
-rw-r--r--jstests/multiVersion/index_signature_fcv.js12
-rw-r--r--jstests/multiVersion/migration_with_mixed_version_shards_and_disable_resumable_range_deleter.js48
-rw-r--r--jstests/multiVersion/v2_delta_oplog_entries_fcv.js4
-rw-r--r--jstests/replsets/quiesce_mode_turned_off_in_fcv_44.js4
-rw-r--r--jstests/replsets/reconfig_prohibits_w0.js2
-rw-r--r--jstests/replsets/remove1.js3
-rw-r--r--jstests/sharding/database_versioning_all_commands.js2
-rw-r--r--src/mongo/db/catalog/README.md2
-rw-r--r--src/mongo/db/commands/conn_pool_stats.cpp2
-rw-r--r--src/mongo/db/commands/feature_compatibility_version.cpp25
-rw-r--r--src/mongo/db/commands/feature_compatibility_version_command_parser.cpp4
-rw-r--r--src/mongo/db/commands/feature_compatibility_version_parser.h20
-rw-r--r--src/mongo/db/commands/run_aggregate.cpp2
-rw-r--r--src/mongo/db/commands/set_feature_compatibility_version_command.cpp29
-rw-r--r--src/mongo/db/index/index_descriptor.cpp16
-rw-r--r--src/mongo/db/mongod_main.cpp8
-rw-r--r--src/mongo/db/ops/insert.cpp4
-rw-r--r--src/mongo/db/pipeline/aggregation_request.cpp15
-rw-r--r--src/mongo/db/pipeline/document_source_change_stream.cpp2
-rw-r--r--src/mongo/db/query/explain_options.cpp2
-rw-r--r--src/mongo/db/query/query_request.cpp6
-rw-r--r--src/mongo/db/repl/oplog.cpp8
-rw-r--r--src/mongo/db/repl/repl_set_heartbeat_args_v1.cpp4
-rw-r--r--src/mongo/db/repl/replication_coordinator_impl.cpp8
-rw-r--r--src/mongo/db/s/config/configsvr_shard_collection_command.cpp4
-rw-r--r--src/mongo/db/s/config/sharding_catalog_manager_add_shard_test.cpp2
-rw-r--r--src/mongo/db/s/config/sharding_catalog_manager_shard_operations.cpp4
-rw-r--r--src/mongo/db/s/get_shard_version_command.cpp3
-rw-r--r--src/mongo/db/s/shardsvr_shard_collection.cpp4
-rw-r--r--src/mongo/db/s/unset_sharding_command.cpp2
-rw-r--r--src/mongo/db/server_options.h54
-rw-r--r--src/mongo/db/startup_recovery.cpp3
-rw-r--r--src/mongo/db/storage/storage_engine_impl.cpp2
-rw-r--r--src/mongo/db/update/update_driver.cpp2
-rw-r--r--src/mongo/db/update/update_oplog_entry_version.h2
-rw-r--r--src/mongo/db/vector_clock.cpp2
-rw-r--r--src/mongo/db/wire_version.h6
-rw-r--r--src/mongo/s/commands/cluster_reset_error_cmd.cpp2
-rw-r--r--src/mongo/s/commands/cluster_set_feature_compatibility_version_cmd.cpp8
-rw-r--r--src/mongo/s/mongos_main.cpp4
-rw-r--r--src/mongo/s/query/document_source_update_on_add_shard.cpp4
-rw-r--r--src/mongo/s/request_types/set_shard_version_request.cpp2
-rw-r--r--src/mongo/shell/feature_compatibility_version.js2
53 files changed, 177 insertions, 192 deletions
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 5decbc32f9c..e828e583698 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
@@ -30,7 +30,7 @@ selector:
- jstests/sharding/test_stacked_migration_cleanup.js
- jstests/sharding/kill_pinned_cursor.js
- jstests/sharding/killop.js
- # Enable when 4.6 becomes last-lts
+ # Enable when 5.0 becomes last-lts
- jstests/sharding/mongos_dataSize.js
# Enable when SERVER-44733 is backported
- jstests/sharding/change_streams_update_lookup_shard_metadata_missing.js
diff --git a/buildscripts/resmokelib/multiversionconstants.py b/buildscripts/resmokelib/multiversionconstants.py
index 8932219038c..28745ff9991 100644
--- a/buildscripts/resmokelib/multiversionconstants.py
+++ b/buildscripts/resmokelib/multiversionconstants.py
@@ -2,7 +2,7 @@
LAST_LTS_BIN_VERSION = "4.4"
LAST_LTS_FCV = "4.4"
-LATEST_FCV = "4.5.1"
+LATEST_FCV = "4.7"
LAST_LTS_MONGO_BINARY = "mongo-" + LAST_LTS_BIN_VERSION
LAST_LTS_MONGOD_BINARY = "mongod-" + LAST_LTS_BIN_VERSION
diff --git a/jstests/core/apply_ops1.js b/jstests/core/apply_ops1.js
index ee6c2de894b..baa156974a5 100644
--- a/jstests/core/apply_ops1.js
+++ b/jstests/core/apply_ops1.js
@@ -4,7 +4,7 @@
// requires_non_retryable_commands,
// # applyOps uses the oplog that require replication support
// requires_replication,
-// # Uses $v: 2 update oplog entries, only available in 4.6.
+// # Uses $v: 2 update oplog entries, only available in 4.7+.
// requires_fcv_46,
// ]
diff --git a/jstests/core/covered_index_sort_no_fetch_optimization.js b/jstests/core/covered_index_sort_no_fetch_optimization.js
index 964da9d67db..15ab4e3621b 100644
--- a/jstests/core/covered_index_sort_no_fetch_optimization.js
+++ b/jstests/core/covered_index_sort_no_fetch_optimization.js
@@ -7,7 +7,7 @@
* must be fetched to support the SHARDING_FILTER stage.
* @tags: [
* assumes_unsharded_collection,
- * # Sort optimizations added for hashed indexes in 4.6 can generate a different plan.
+ * # Sort optimizations added for hashed indexes in 4.7 can generate a different plan.
* requires_fcv_46
* ]
*/
diff --git a/jstests/core/expr.js b/jstests/core/expr.js
index 0810808ab00..d468b3a421e 100644
--- a/jstests/core/expr.js
+++ b/jstests/core/expr.js
@@ -3,7 +3,7 @@
// requires_getmore,
// requires_non_retryable_writes,
// # Explain reports errors from $expr differently in 4.4 and older, so this test assumes that all
-// # nodes are at least binary version 4.6.
+// # nodes are at least binary version 4.7.
// requires_fcv_46,
// ]
diff --git a/jstests/core/fts_find_and_modify.js b/jstests/core/fts_find_and_modify.js
index 450e22fdf56..3fedd63bf08 100644
--- a/jstests/core/fts_find_and_modify.js
+++ b/jstests/core/fts_find_and_modify.js
@@ -6,7 +6,7 @@
* # predicate to contain the shard key.
* assumes_unsharded_collection,
* # We chose not to backport the bug fix for $text + findAndModify to the 4.4 branch, so all
- * # nodes must be at least binary version 4.6.
+ * # nodes must be at least binary version 4.7.
* requires_fcv_46,
* # Ban in any configurations that require retryable writes. Although findAndModify is a
* # retryable write command, the 'fields' option does not currently work with retryable writes.
diff --git a/jstests/core/hashed_index_sort.js b/jstests/core/hashed_index_sort.js
index eeaf793904c..c3f6dd8d6c7 100644
--- a/jstests/core/hashed_index_sort.js
+++ b/jstests/core/hashed_index_sort.js
@@ -4,7 +4,7 @@
* prefix.
* @tags: [
* assumes_unsharded_collection,
- * # Sort optimizations added in 4.6 can generate a different plan in the presence of equality
+ * # Sort optimizations added in 4.7 can generate a different plan in the presence of equality
* # predicates.
* requires_fcv_46
* ]
diff --git a/jstests/core/index_signature.js b/jstests/core/index_signature.js
index 4cfdf47e881..5a45dd917c1 100644
--- a/jstests/core/index_signature.js
+++ b/jstests/core/index_signature.js
@@ -3,10 +3,7 @@
* which uniquely identify an index. Multiple indexes can be created on the same key pattern if
* their signature parameters differ.
*
- * TODO SERVER-46592: This test is multiversion-incompatible in 4.6. If we use 'requires_fcv_46'
- * as the tag for that, removing 'requires_fcv_44' is sufficient. Otherwise,
- * please set the appropriate tag when removing 'requires_fcv_44'
- * @tags: [requires_fcv_44, requires_fcv_46, requires_non_retryable_writes]
+ * @tags: [requires_fcv_46, requires_non_retryable_writes]
*/
(function() {
"use strict";
diff --git a/jstests/multiVersion/allow_system_views_user_writes_in_fcv_44.js b/jstests/multiVersion/allow_system_views_user_writes_in_fcv_44.js
index d8628615684..854a48b575d 100644
--- a/jstests/multiVersion/allow_system_views_user_writes_in_fcv_44.js
+++ b/jstests/multiVersion/allow_system_views_user_writes_in_fcv_44.js
@@ -1,7 +1,7 @@
/**
* Tests that users are allowed to write to the system.views collecion if not on the latest FCV.
*
- * TODO (SERVER-49545): Remove this test after branching for 4.8.
+ * TODO (SERVER-49545): Remove this test when 5.0 becomes last-lts.
*/
(function() {
"use strict";
@@ -30,4 +30,4 @@ assert.commandWorked(db.system.views.update({}, invalidField));
assert.commandWorked(db.system.views.remove({}));
MongoRunner.stopMongod(conn);
-})(); \ No newline at end of file
+})();
diff --git a/jstests/multiVersion/genericSetFCVUsage/major_version_upgrade.js b/jstests/multiVersion/genericSetFCVUsage/major_version_upgrade.js
index db5401369d9..a568a5812d9 100644
--- a/jstests/multiVersion/genericSetFCVUsage/major_version_upgrade.js
+++ b/jstests/multiVersion/genericSetFCVUsage/major_version_upgrade.js
@@ -39,7 +39,7 @@ const versions = [
{binVersion: '4.4', featureCompatibilityVersion: '4.4', testCollection: 'four_four'},
{binVersion: 'last-lts', testCollection: 'last_lts'},
{binVersion: 'last-continuous', testCollection: 'last_continuous'},
- {binVersion: 'latest', featureCompatibilityVersion: '4.5.1', testCollection: 'latest'},
+ {binVersion: 'latest', featureCompatibilityVersion: '4.7', testCollection: 'latest'},
];
// These key patterns are considered valid for existing v:0 and v:1 indexes, but are considered
diff --git a/jstests/multiVersion/index_signature_fcv.js b/jstests/multiVersion/index_signature_fcv.js
index 745fc000e34..967a8a4aff0 100644
--- a/jstests/multiVersion/index_signature_fcv.js
+++ b/jstests/multiVersion/index_signature_fcv.js
@@ -1,14 +1,14 @@
/**
* Tests that the following FCV constraints are observed when building indexes:
*
- * - Multiple indexes which differ only by partial filter expression can be built in FCV 4.6.
+ * - Multiple indexes which differ only by partial filter expression can be built in FCV 4.7+.
* - The planner can continue to use these indexes after downgrading to FCV 4.4.
* - These indexes can be dropped in FCV 4.4.
* - Indexes which differ only by partialFilterExpression cannot be created in FCV 4.4.
* - We do not fassert if the set is downgraded to binary 4.4 with "duplicate" indexes present.
*
- * TODO SERVER-47766: this test is specific to the 4.4 - 4.6 upgrade process, and can be removed
- * after we branch for 4.7.
+ * TODO SERVER-47766: this test is specific to the 4.4 - 4.7+ upgrade process, and can be removed
+ * when 5.0 becomes last-lts.
*/
(function() {
"use strict";
@@ -36,7 +36,7 @@ function assertIndexedQuery(query, numAlternativePlans) {
assert.eq(getRejectedPlans(explainOut).length, numAlternativePlans, explainOut);
}
-// Test that multiple indexes differing only by partialFilterExpression can be created in FCV 4.6.
+// Test that multiple indexes differing only by partialFilterExpression can be created in FCV 4.7+.
testDB.adminCommand({setFeatureCompatibilityVersion: latestFCV});
assert.commandWorked(
coll.createIndex({a: 1}, {name: "index1", partialFilterExpression: {a: {$gte: 0}}}));
@@ -45,12 +45,12 @@ assert.commandWorked(
assert.commandWorked(
coll.createIndex({a: 1}, {name: "index3", partialFilterExpression: {a: {$gte: 100}}}));
-// Test that the planner considers all relevant partial indexes when answering a query in FCV 4.6.
+// Test that the planner considers all relevant partial indexes when answering a query in FCV 4.7+.
assertIndexedQuery({a: 1}, 0);
assertIndexedQuery({a: 11}, 1);
assertIndexedQuery({a: 101}, 2);
-// Test that an index build restarted during startup recovery in FCV 4.6 does not revert to FCV 4.4
+// Test that an index build restarted during startup recovery in FCV 4.7+ does not revert to FCV 4.4
// behavior.
jsTestLog("Starting index build on primary and pausing before completion");
IndexBuildTest.pauseIndexBuilds(primary);
diff --git a/jstests/multiVersion/migration_with_mixed_version_shards_and_disable_resumable_range_deleter.js b/jstests/multiVersion/migration_with_mixed_version_shards_and_disable_resumable_range_deleter.js
index d7b3201177b..0a32fd6c28b 100644
--- a/jstests/multiVersion/migration_with_mixed_version_shards_and_disable_resumable_range_deleter.js
+++ b/jstests/multiVersion/migration_with_mixed_version_shards_and_disable_resumable_range_deleter.js
@@ -1,5 +1,5 @@
/*
- * Tests that migrations behave correctly between v4.4 and v4.6 when one or both nodes have the
+ * Tests that migrations behave correctly between v4.4 and v4.7+ when one or both nodes have the
* 'disableResumableRangeDeleter' parameter set to true.
*
* requires_persistence because this test restarts shards and expects them to have their data files.
@@ -38,16 +38,16 @@ const st = new ShardingTest({
assert.commandWorked(st.s.adminCommand({enableSharding: dbName}));
assert.commandWorked(st.s.adminCommand({movePrimary: dbName, to: st.shard0.shardName}));
-const v46shard = st.rs0;
+const vLatestShard = st.rs0;
const v44shard = st.rs1;
//
-// Tests with v4.6 donor, v4.4 recipient
+// Tests with v4.7+ donor, v4.4 recipient
//
(() => {
- jsTestLog("v4.6 donor, v4.4 recipient, both disableResumableRangeDeleter=false");
- setDisableResumableRangeDeleter(false, v46shard);
+ jsTestLog("v4.7+ donor, v4.4 recipient, both disableResumableRangeDeleter=false");
+ setDisableResumableRangeDeleter(false, vLatestShard);
setDisableResumableRangeDeleter(false, v44shard);
const [collName, ns] = getNewNs(dbName);
assert.commandWorked(st.s.adminCommand({shardCollection: ns, key: {x: 1}}));
@@ -56,8 +56,8 @@ const v44shard = st.rs1;
(() => {
jsTestLog(
- "v4.6 donor with disableResumableRangeDeleter=true, v4.4 recipient with disableResumableRangeDeleter=false");
- setDisableResumableRangeDeleter(true, v46shard);
+ "v4.7+ donor with disableResumableRangeDeleter=true, v4.4 recipient with disableResumableRangeDeleter=false");
+ setDisableResumableRangeDeleter(true, vLatestShard);
setDisableResumableRangeDeleter(false, v44shard);
const [collName, ns] = getNewNs(dbName);
assert.commandWorked(st.s.adminCommand({shardCollection: ns, key: {x: 1}}));
@@ -65,8 +65,8 @@ const v44shard = st.rs1;
})();
(() => {
- jsTestLog("v4.6 donor, v4.4 recipient, both disableResumableRangeDeleter=true");
- setDisableResumableRangeDeleter(true, v46shard);
+ jsTestLog("v4.7+ donor, v4.4 recipient, both disableResumableRangeDeleter=true");
+ setDisableResumableRangeDeleter(true, vLatestShard);
setDisableResumableRangeDeleter(true, v44shard);
const [collName, ns] = getNewNs(dbName);
assert.commandWorked(st.s.adminCommand({shardCollection: ns, key: {x: 1}}));
@@ -75,8 +75,8 @@ const v44shard = st.rs1;
(() => {
jsTestLog(
- "v4.6 donor with disableResumableRangeDeleter=false, v4.4 recipient with disableResumableRangeDeleter=true");
- setDisableResumableRangeDeleter(false, v46shard);
+ "v4.7+ donor with disableResumableRangeDeleter=false, v4.4 recipient with disableResumableRangeDeleter=true");
+ setDisableResumableRangeDeleter(false, vLatestShard);
setDisableResumableRangeDeleter(true, v44shard);
const [collName, ns] = getNewNs(dbName);
assert.commandWorked(st.s.adminCommand({shardCollection: ns, key: {x: 1}}));
@@ -84,47 +84,47 @@ const v44shard = st.rs1;
})();
//
-// Tests with v4.4 donor, v4.6 recipient
+// Tests with v4.4 donor, v4.7+ recipient
//
assert.commandWorked(st.s.adminCommand({movePrimary: dbName, to: st.shard1.shardName}));
(() => {
- jsTestLog("v4.4 donor, v4.6 recipient, both disableResumableRangeDeleter=false");
+ jsTestLog("v4.4 donor, v4.7+ recipient, both disableResumableRangeDeleter=false");
setDisableResumableRangeDeleter(false, v44shard);
- setDisableResumableRangeDeleter(false, v46shard);
+ setDisableResumableRangeDeleter(false, vLatestShard);
const [collName, ns] = getNewNs(dbName);
assert.commandWorked(st.s.adminCommand({shardCollection: ns, key: {x: 1}}));
- assert.commandWorked(st.s.adminCommand({moveChunk: ns, find: {x: 0}, to: v46shard.name}));
+ assert.commandWorked(st.s.adminCommand({moveChunk: ns, find: {x: 0}, to: vLatestShard.name}));
})();
(() => {
jsTestLog(
- "v4.4 donor with disableResumableRangeDeleter=true, v4.6 recipient with disableResumableRangeDeleter=false");
+ "v4.4 donor with disableResumableRangeDeleter=true, v4.7+ recipient with disableResumableRangeDeleter=false");
setDisableResumableRangeDeleter(true, v44shard);
- setDisableResumableRangeDeleter(false, v46shard);
+ setDisableResumableRangeDeleter(false, vLatestShard);
const [collName, ns] = getNewNs(dbName);
assert.commandWorked(st.s.adminCommand({shardCollection: ns, key: {x: 1}}));
- assert.commandWorked(st.s.adminCommand({moveChunk: ns, find: {x: 0}, to: v46shard.name}));
+ assert.commandWorked(st.s.adminCommand({moveChunk: ns, find: {x: 0}, to: vLatestShard.name}));
})();
(() => {
- jsTestLog("v4.4 donor, v4.6 recipient, both disableResumableRangeDeleter=true");
+ jsTestLog("v4.4 donor, v4.7+ recipient, both disableResumableRangeDeleter=true");
setDisableResumableRangeDeleter(true, v44shard);
- setDisableResumableRangeDeleter(true, v46shard);
+ setDisableResumableRangeDeleter(true, vLatestShard);
const [collName, ns] = getNewNs(dbName);
assert.commandWorked(st.s.adminCommand({shardCollection: ns, key: {x: 1}}));
- assert.commandWorked(st.s.adminCommand({moveChunk: ns, find: {x: 0}, to: v46shard.name}));
+ assert.commandWorked(st.s.adminCommand({moveChunk: ns, find: {x: 0}, to: vLatestShard.name}));
})();
(() => {
jsTestLog(
- "v4.4 donor with disableResumableRangeDeleter=false, v4.6 recipient with disableResumableRangeDeleter=true");
+ "v4.4 donor with disableResumableRangeDeleter=false, v4.7+ recipient with disableResumableRangeDeleter=true");
setDisableResumableRangeDeleter(false, v44shard);
- setDisableResumableRangeDeleter(true, v46shard);
+ setDisableResumableRangeDeleter(true, vLatestShard);
const [collName, ns] = getNewNs(dbName);
assert.commandWorked(st.s.adminCommand({shardCollection: ns, key: {x: 1}}));
- assert.commandWorked(st.s.adminCommand({moveChunk: ns, find: {x: 0}, to: v46shard.name}));
+ assert.commandWorked(st.s.adminCommand({moveChunk: ns, find: {x: 0}, to: vLatestShard.name}));
})();
st.stop();
diff --git a/jstests/multiVersion/v2_delta_oplog_entries_fcv.js b/jstests/multiVersion/v2_delta_oplog_entries_fcv.js
index e17899888e7..db50335567c 100644
--- a/jstests/multiVersion/v2_delta_oplog_entries_fcv.js
+++ b/jstests/multiVersion/v2_delta_oplog_entries_fcv.js
@@ -142,7 +142,7 @@ const rst = new ReplSetTest({nodes: 2, nodeOpts: {noCleanData: true}});
// them via applyOps.
runUpdateAndCheckV2EntriesNotLogged(coll);
- // The error code used by 4.4 in this scenario is different from the one used in 4.6.
+ // The error code used by 4.4 in this scenario is different from the one used in 4.7+.
const k44ApplyOpsUnknownUpdateVersionErrorCode = 40682;
checkApplyOpsOfV2Entries(coll, k44ApplyOpsUnknownUpdateVersionErrorCode);
@@ -252,7 +252,7 @@ const rst = new ReplSetTest({nodes: 2, nodeOpts: {noCleanData: true}});
assert.commandWorked(coll.insert({_id: 1, padding: kGiantStr}));
// First we are going to run a $v:2 eligible update and have it hang after it checks the
- // FCV. It will read a value of 4.5/4.6, and based on that, decide to log a $v: 2 oplog
+ // FCV. It will read a value of 4.7+, and based on that, decide to log a $v: 2 oplog
// entry.
const kPipelineFCVCheckFPName = "hangAfterPipelineUpdateFCVCheck";
diff --git a/jstests/replsets/quiesce_mode_turned_off_in_fcv_44.js b/jstests/replsets/quiesce_mode_turned_off_in_fcv_44.js
index 06487587c4c..6f02cfb3713 100644
--- a/jstests/replsets/quiesce_mode_turned_off_in_fcv_44.js
+++ b/jstests/replsets/quiesce_mode_turned_off_in_fcv_44.js
@@ -1,7 +1,7 @@
/*
* Tests that a node does not enter quiesce mode during shutdown if we are in FCV 4.4.
*
- * TODO SERVER-49138: Remove this test once we branch for 4.8.
+ * TODO SERVER-49138: Remove this test when 5.0 becomes last-lts.
*
* @tags: [multiversion_incompatible]
*/
@@ -29,4 +29,4 @@ jsTestLog("Check for the absence of quiesce mode logs");
assert(!checkLog.checkContainsOnce(primary, "Entering quiesce mode for shutdown"));
rst.stopSet();
-}()); \ No newline at end of file
+}());
diff --git a/jstests/replsets/reconfig_prohibits_w0.js b/jstests/replsets/reconfig_prohibits_w0.js
index 90fe4d8705a..f6193863eac 100644
--- a/jstests/replsets/reconfig_prohibits_w0.js
+++ b/jstests/replsets/reconfig_prohibits_w0.js
@@ -18,7 +18,7 @@ function testReconfig(gleDefaults) {
conf.version++;
var response = admin.runCommand({replSetReconfig: conf});
- // TODO (SERVER-48065): Once 4.6 is last-lts, remove
+ // TODO (SERVER-48065): When 5.0 becomes last-lts, remove
// ErrorCodes.NewReplicaSetConfigurationIncompatible.
assert.commandFailedWithCode(
response,
diff --git a/jstests/replsets/remove1.js b/jstests/replsets/remove1.js
index 447c0b2d478..5f5fb247d0e 100644
--- a/jstests/replsets/remove1.js
+++ b/jstests/replsets/remove1.js
@@ -7,7 +7,8 @@
* Add it back as secondary
* Make sure both nodes are either primary or secondary
*
- * This test assumes 'newlyAdded' fields are enabled, so blacklist from multiversion tests in 4.6.
+ * This test assumes 'newlyAdded' fields are enabled, so blacklist from multiversion tests
+ * against 4.4.
*
* SERVER-49428: Disable for ephemeralForTest, writeConcernMajorityJournalDefault is not off
* @tags: [
diff --git a/jstests/sharding/database_versioning_all_commands.js b/jstests/sharding/database_versioning_all_commands.js
index f5bac9df015..bf7fba3a2ca 100644
--- a/jstests/sharding/database_versioning_all_commands.js
+++ b/jstests/sharding/database_versioning_all_commands.js
@@ -667,7 +667,7 @@ let testCases = {
};
commandsRemovedFromMongosSinceLastLTS.forEach(function(cmd) {
- testCases[cmd] = {skip: "must define test coverage for 4.6 backwards compatibility"};
+ testCases[cmd] = {skip: "must define test coverage for latest version backwards compatibility"};
});
const st = new ShardingTest({shards: 2, mongos: 2});
diff --git a/src/mongo/db/catalog/README.md b/src/mongo/db/catalog/README.md
index 1544263788a..7629ff2c3ea 100644
--- a/src/mongo/db/catalog/README.md
+++ b/src/mongo/db/catalog/README.md
@@ -661,7 +661,7 @@ rebuilt](https://github.com/mongodb/mongo/blob/e485c1a8011d85682cb8dafa87ab92b9c
running with enableMajorityReadConcern=false.
The second step of recovering the catalog is [reconciling unfinished index builds](https://github.com/mongodb/mongo/blob/e485c1a8011d85682cb8dafa87ab92b9c23daa66/src/mongo/db/storage/storage_engine_impl.cpp#L427-L432
-"Github"). In 4.6 the story will simplify, but right now there are a few outcomes:
+"Github"). In 4.7+ the story will simplify, but right now there are a few outcomes:
* An [unfinished FCV 4.2- background index build on the primary](https://github.com/mongodb/mongo/blob/e485c1a8011d85682cb8dafa87ab92b9c23daa66/src/mongo/db/storage/storage_engine_impl.cpp#L527-L542 "Github") will be discarded (no oplog entry
was ever written saying the index exists).
* An [unfinished FCV 4.2- background index build on a secondary](https://github.com/mongodb/mongo/blob/e485c1a8011d85682cb8dafa87ab92b9c23daa66/src/mongo/db/storage/storage_engine_impl.cpp#L513-L525 "Github") will be rebuilt in the foreground
diff --git a/src/mongo/db/commands/conn_pool_stats.cpp b/src/mongo/db/commands/conn_pool_stats.cpp
index 8f3f68f33e0..218f1c7d90e 100644
--- a/src/mongo/db/commands/conn_pool_stats.cpp
+++ b/src/mongo/db/commands/conn_pool_stats.cpp
@@ -113,7 +113,7 @@ public:
} poolStatsCmd;
-// This command currently returns nothing, since the shard connection pool no longer exists (v4.6).
+// This command currently returns nothing, since the shard connection pool no longer exists (v4.7+).
class ShardedPoolStats final : public BasicCommand {
public:
ShardedPoolStats() : BasicCommand("shardConnPoolStats") {}
diff --git a/src/mongo/db/commands/feature_compatibility_version.cpp b/src/mongo/db/commands/feature_compatibility_version.cpp
index 285c3068c48..04df3030c56 100644
--- a/src/mongo/db/commands/feature_compatibility_version.cpp
+++ b/src/mongo/db/commands/feature_compatibility_version.cpp
@@ -288,27 +288,12 @@ void FeatureCompatibilityVersion::initializeForStartup(OperationContext* opCtx)
FeatureCompatibilityVersion::updateMinWireVersion();
// On startup, if the version is in an upgrading or downgrading state, print a warning.
- if (version == ServerGlobalParams::FeatureCompatibility::Version::kUpgradingFrom44To451) {
+ if (serverGlobalParams.featureCompatibility.isUpgradingOrDowngrading()) {
LOGV2_WARNING_OPTIONS(
- 21011,
+ 4978301,
{logv2::LogTag::kStartupWarnings},
- "A featureCompatibilityVersion upgrade did not complete. The current "
- "featureCompatibilityVersion is {currentfeatureCompatibilityVersion}. To fix this, "
- "use the setFeatureCompatibilityVersion command to resume upgrade to 4.5.1",
- "A featureCompatibilityVersion upgrade did not complete. To fix this, use the "
- "setFeatureCompatibilityVersion command to resume upgrade to 4.5.1",
- "currentfeatureCompatibilityVersion"_attr =
- FeatureCompatibilityVersionParser::toString(version));
- } else if (version ==
- ServerGlobalParams::FeatureCompatibility::Version::kDowngradingFrom451To44) {
- LOGV2_WARNING_OPTIONS(
- 21014,
- {logv2::LogTag::kStartupWarnings},
- "A featureCompatibilityVersion downgrade did not complete. The current "
- "featureCompatibilityVersion is {currentfeatureCompatibilityVersion}. To fix this, "
- "use the setFeatureCompatibilityVersion command to resume downgrade to 4.4.",
- "A featureCompatibilityVersion downgrade did not complete. To fix this, use the "
- "setFeatureCompatibilityVersion command to resume downgrade to 4.5.1",
+ "A featureCompatibilityVersion upgrade/downgrade did not complete. To fix this, use "
+ "the setFeatureCompatibilityVersion command to resume the upgrade/downgrade",
"currentfeatureCompatibilityVersion"_attr =
FeatureCompatibilityVersionParser::toString(version));
}
@@ -394,7 +379,7 @@ void FeatureCompatibilityVersion::_setVersion(
// (Generic FCV reference): This FCV check should exist across LTS binary versions.
const auto shouldIncrementTopologyVersion =
newVersion == ServerGlobalParams::FeatureCompatibility::kLastLTS ||
- newVersion == ServerGlobalParams::FeatureCompatibility::Version::kUpgradingFrom44To451;
+ newVersion == ServerGlobalParams::FeatureCompatibility::Version::kUpgradingFrom44To47;
if (isReplSet && shouldIncrementTopologyVersion) {
replCoordinator->incrementTopologyVersion();
}
diff --git a/src/mongo/db/commands/feature_compatibility_version_command_parser.cpp b/src/mongo/db/commands/feature_compatibility_version_command_parser.cpp
index 27b35a3513b..1b93733c646 100644
--- a/src/mongo/db/commands/feature_compatibility_version_command_parser.cpp
+++ b/src/mongo/db/commands/feature_compatibility_version_command_parser.cpp
@@ -77,11 +77,11 @@ StatusWith<std::string> FeatureCompatibilityVersionCommandParser::extractVersion
const std::string version = versionElem.String();
- if (version != FeatureCompatibilityVersionParser::kVersion451 &&
+ if (version != FeatureCompatibilityVersionParser::kVersion47 &&
version != FeatureCompatibilityVersionParser::kVersion44) {
return {ErrorCodes::BadValue,
str::stream() << "Invalid command argument. Expected '"
- << FeatureCompatibilityVersionParser::kVersion451 << "' or '"
+ << FeatureCompatibilityVersionParser::kVersion47 << "' or '"
<< FeatureCompatibilityVersionParser::kVersion44 << "', found "
<< version << " in: " << cmdObj << ". See "
<< feature_compatibility_version_documentation::kCompatibilityLink
diff --git a/src/mongo/db/commands/feature_compatibility_version_parser.h b/src/mongo/db/commands/feature_compatibility_version_parser.h
index 2fdaf962c49..6c9f9ab4364 100644
--- a/src/mongo/db/commands/feature_compatibility_version_parser.h
+++ b/src/mongo/db/commands/feature_compatibility_version_parser.h
@@ -41,16 +41,16 @@ namespace mongo {
class FeatureCompatibilityVersionParser {
public:
static constexpr StringData kVersion44 = "4.4"_sd;
- static constexpr StringData kVersion451 = "4.5.1"_sd;
- static constexpr StringData kVersionDowngradingFrom451To44 = "downgrading from 4.5.1 to 4.4"_sd;
- static constexpr StringData kVersionUpgradingFrom44To451 = "upgrading from 4.4 to 4.5.1"_sd;
+ static constexpr StringData kVersion47 = "4.7"_sd;
+ static constexpr StringData kVersionDowngradingFrom47To44 = "downgrading from 4.7 to 4.4"_sd;
+ static constexpr StringData kVersionUpgradingFrom44To47 = "upgrading from 4.4 to 4.7"_sd;
static constexpr StringData kVersionUnset = "Unset"_sd;
static constexpr StringData kParameterName = "featureCompatibilityVersion"_sd;
static constexpr StringData kLastLTS = kVersion44;
static constexpr StringData kLastContinuous = kVersion44;
- static constexpr StringData kLatest = kVersion451;
+ static constexpr StringData kLatest = kVersion47;
static ServerGlobalParams::FeatureCompatibility::Version parseVersion(StringData versionString);
@@ -76,12 +76,12 @@ public:
return kVersionUnset;
case ServerGlobalParams::FeatureCompatibility::Version::kFullyDowngradedTo44:
return kVersion44;
- case ServerGlobalParams::FeatureCompatibility::Version::kUpgradingFrom44To451:
- return kVersionUpgradingFrom44To451;
- case ServerGlobalParams::FeatureCompatibility::Version::kDowngradingFrom451To44:
- return kVersionDowngradingFrom451To44;
- case ServerGlobalParams::FeatureCompatibility::Version::kVersion451:
- return kVersion451;
+ case ServerGlobalParams::FeatureCompatibility::Version::kUpgradingFrom44To47:
+ return kVersionUpgradingFrom44To47;
+ case ServerGlobalParams::FeatureCompatibility::Version::kDowngradingFrom47To44:
+ return kVersionDowngradingFrom47To44;
+ case ServerGlobalParams::FeatureCompatibility::Version::kVersion47:
+ return kVersion47;
default:
MONGO_UNREACHABLE;
}
diff --git a/src/mongo/db/commands/run_aggregate.cpp b/src/mongo/db/commands/run_aggregate.cpp
index 855556d154d..5964e931397 100644
--- a/src/mongo/db/commands/run_aggregate.cpp
+++ b/src/mongo/db/commands/run_aggregate.cpp
@@ -353,7 +353,7 @@ Status collatorCompatibleWithPipeline(OperationContext* opCtx,
return Status::OK();
}
-// A 4.6 mongoS issues $mergeCursors pipelines with ChunkVersion::IGNORED. On the shard, this will
+// A 4.7+ mongoS issues $mergeCursors pipelines with ChunkVersion::IGNORED. On the shard, this will
// skip the versioning check but also marks the operation as versioned, so the shard knows that any
// sub-operations executed by the merging pipeline should also be versioned. We manually set the
// IGNORED version here if we are running a $mergeCursors pipeline and the operation is not already
diff --git a/src/mongo/db/commands/set_feature_compatibility_version_command.cpp b/src/mongo/db/commands/set_feature_compatibility_version_command.cpp
index 87b0540ebea..224a8a7b934 100644
--- a/src/mongo/db/commands/set_feature_compatibility_version_command.cpp
+++ b/src/mongo/db/commands/set_feature_compatibility_version_command.cpp
@@ -93,8 +93,9 @@ void deletePersistedDefaultRWConcernDocument(OperationContext* opCtx) {
}
/**
- * Sets the minimum allowed version for the cluster. If it is 4.4, then the node should not
- * use 4.5.1 features.
+ * Sets the minimum allowed feature compatibility version for the cluster. The cluster should not
+ * use any new features introduced in binary versions that are newer than the feature compatibility
+ * version set.
*
* Format:
* {
@@ -122,11 +123,11 @@ public:
using FCVP = FeatureCompatibilityVersionParser;
std::stringstream h;
h << "Set the featureCompatibilityVersion exposed by this node. If set to '"
- << FCVP::kVersion44 << "', then " << FCVP::kVersion451
- << " features are disabled. If set to '" << FCVP::kVersion451 << "', then "
- << FCVP::kVersion451
+ << FCVP::kVersion44 << "', then " << FCVP::kVersion47
+ << " features are disabled. If set to '" << FCVP::kVersion47 << "', then "
+ << FCVP::kVersion47
<< " features are enabled, and all nodes in the cluster must be binary version "
- << FCVP::kVersion451 << ". See "
+ << FCVP::kVersion47 << ". See "
<< feature_compatibility_version_documentation::kCompatibilityLink << ".";
return h.str();
}
@@ -184,15 +185,15 @@ public:
ServerGlobalParams::FeatureCompatibility::Version actualVersion =
serverGlobalParams.featureCompatibility.getVersion();
- if (requestedVersion == FeatureCompatibilityVersionParser::kVersion451) {
+ if (requestedVersion == FeatureCompatibilityVersionParser::kVersion47) {
uassert(ErrorCodes::IllegalOperation,
- "cannot initiate featureCompatibilityVersion upgrade to 4.5.1 while a previous "
+ "cannot initiate featureCompatibilityVersion upgrade to 4.7 while a previous "
"featureCompatibilityVersion downgrade to 4.4 has not completed. Finish "
- "downgrade to 4.4, then upgrade to 4.5.1.",
+ "downgrade to 4.4, then upgrade to 4.7.",
actualVersion !=
- ServerGlobalParams::FeatureCompatibility::Version::kDowngradingFrom451To44);
+ ServerGlobalParams::FeatureCompatibility::Version::kDowngradingFrom47To44);
- if (actualVersion == ServerGlobalParams::FeatureCompatibility::Version::kVersion451) {
+ if (actualVersion == ServerGlobalParams::FeatureCompatibility::Version::kVersion47) {
// Set the client's last opTime to the system last opTime so no-ops wait for
// writeConcern.
repl::ReplClientInfo::forClient(opCtx->getClient())
@@ -207,7 +208,7 @@ public:
// Take the global lock in S mode to create a barrier for operations taking the
// global IX or X locks. This ensures that either
// - The global IX/X locked operation will start after the FCV change, see the
- // upgrading to 4.5.1 FCV and act accordingly.
+ // upgrading to the latest FCV and act accordingly.
// - The global IX/X locked operation began prior to the FCV change, is acting on
// that assumption and will finish before upgrade procedures begin right after
// this.
@@ -243,9 +244,9 @@ public:
} else if (requestedVersion == FeatureCompatibilityVersionParser::kVersion44) {
uassert(ErrorCodes::IllegalOperation,
"cannot initiate setting featureCompatibilityVersion to 4.4 while a previous "
- "featureCompatibilityVersion upgrade to 4.5.1 has not completed.",
+ "featureCompatibilityVersion upgrade to 4.7 has not completed.",
actualVersion !=
- ServerGlobalParams::FeatureCompatibility::Version::kUpgradingFrom44To451);
+ ServerGlobalParams::FeatureCompatibility::Version::kUpgradingFrom44To47);
if (actualVersion ==
ServerGlobalParams::FeatureCompatibility::Version::kFullyDowngradedTo44) {
diff --git a/src/mongo/db/index/index_descriptor.cpp b/src/mongo/db/index/index_descriptor.cpp
index a16478bc4ac..465ed4729be 100644
--- a/src/mongo/db/index/index_descriptor.cpp
+++ b/src/mongo/db/index/index_descriptor.cpp
@@ -177,14 +177,14 @@ IndexDescriptor::Comparison IndexDescriptor::compareIndexOptions(
return Comparison::kDifferent;
}
- // The partialFilterExpression is only part of the index signature if FCV has been set to 4.6.
- // TODO SERVER-47766: remove these FCV checks after we branch for 4.7.
- auto isFCV46 = serverGlobalParams.featureCompatibility.isGreaterThanOrEqualTo(
- ServerGlobalParams::FeatureCompatibility::Version::kVersion451);
+ // The partialFilterExpression is only part of the index signature if FCV has been set to 4.7+.
+ // TODO SERVER-47766: remove these FCV checks when 5.0 becomes last-lts.
+ auto isFCVAtLeast47 = serverGlobalParams.featureCompatibility.isGreaterThanOrEqualTo(
+ ServerGlobalParams::FeatureCompatibility::Version::kVersion47);
// If we have a partial filter expression and the other index doesn't, or vice-versa, then the
// two indexes are not equivalent. We therefore return Comparison::kDifferent immediately.
- if (isFCV46 && isPartial() != other->descriptor()->isPartial()) {
+ if (isFCVAtLeast47 && isPartial() != other->descriptor()->isPartial()) {
return Comparison::kDifferent;
}
// Compare 'partialFilterExpression' in each descriptor to see if they are equivalent. We use
@@ -193,7 +193,7 @@ IndexDescriptor::Comparison IndexDescriptor::compareIndexOptions(
// For instance, under a case-sensitive collation, the predicates {a: "blah"} and {a: "BLAH"}
// would match the same set of documents, but these are not currently considered equivalent.
// TODO SERVER-47664: take collation into account while comparing string predicates.
- if (isFCV46 && other->getFilterExpression()) {
+ if (isFCVAtLeast47 && other->getFilterExpression()) {
auto expCtx = make_intrusive<ExpressionContext>(opCtx, std::move(collator), ns);
auto filter = MatchExpressionParser::parseAndNormalize(partialFilterExpression(), expCtx);
if (!filter->equivalent(other->getFilterExpression())) {
@@ -211,10 +211,10 @@ IndexDescriptor::Comparison IndexDescriptor::compareIndexOptions(
std::map<StringData, BSONElement> newOptionsMap;
populateOptionsMap(newOptionsMap, other->descriptor()->infoObj());
- // If the FCV has not been upgraded to 4.6, add partialFilterExpression to the options map. It
+ // If the FCV has not been upgraded to 4.7+, add partialFilterExpression to the options map. It
// does not contribute to the index signature, but can determine whether or not the candidate
// index is identical to the existing index.
- if (!isFCV46) {
+ if (!isFCVAtLeast47) {
existingOptionsMap[IndexDescriptor::kPartialFilterExprFieldName] =
other->descriptor()->infoObj()[IndexDescriptor::kPartialFilterExprFieldName];
newOptionsMap[IndexDescriptor::kPartialFilterExprFieldName] =
diff --git a/src/mongo/db/mongod_main.cpp b/src/mongo/db/mongod_main.cpp
index 179b8a6138b..b00285bad54 100644
--- a/src/mongo/db/mongod_main.cpp
+++ b/src/mongo/db/mongod_main.cpp
@@ -1051,12 +1051,12 @@ void shutdownTask(const ShutdownTaskArgs& shutdownArgs) {
(opCtx->getServiceContext()->getPreciseClockSource()->now() - stepDownStartTime));
}
- // TODO SERVER-49138: Remove this FCV check once we branch for 4.8.
- // We must FCV gate the Quiesce mode feature so that a 4.6 node entering Quiesce mode in a mixed
- // 4.4/4.6 replica set does not delay a 4.4 node from finding a valid sync source.
+ // TODO SERVER-49138: Remove this FCV check when 5.0 becomes last-lts.
+ // We must FCV gate the Quiesce mode feature so that a 4.7+ node entering Quiesce mode in a
+ // mixed 4.4/4.7+ replica set does not delay a 4.4 node from finding a valid sync source.
if (serverGlobalParams.featureCompatibility.isVersionInitialized() &&
serverGlobalParams.featureCompatibility.isGreaterThanOrEqualTo(
- ServerGlobalParams::FeatureCompatibility::Version::kVersion451)) {
+ ServerGlobalParams::FeatureCompatibility::Version::kVersion47)) {
if (auto replCoord = repl::ReplicationCoordinator::get(serviceContext);
replCoord && replCoord->enterQuiesceModeIfSecondary(shutdownTimeout)) {
ServiceContext::UniqueOperationContext uniqueOpCtx;
diff --git a/src/mongo/db/ops/insert.cpp b/src/mongo/db/ops/insert.cpp
index 91a405a18d9..383536913e1 100644
--- a/src/mongo/db/ops/insert.cpp
+++ b/src/mongo/db/ops/insert.cpp
@@ -172,11 +172,11 @@ StatusWith<BSONObj> fixDocumentForInsert(ServiceContext* service, const BSONObj&
}
Status userAllowedWriteNS(const NamespaceString& ns) {
- // TODO (SERVER-49545): Remove the FCV check after branching for 4.8.
+ // TODO (SERVER-49545): Remove the FCV check when 5.0 becomes last-lts.
if (ns.isSystemDotProfile() ||
(ns.isSystemDotViews() && serverGlobalParams.featureCompatibility.isVersionInitialized() &&
serverGlobalParams.featureCompatibility.isGreaterThanOrEqualTo(
- ServerGlobalParams::FeatureCompatibility::Version::kVersion451))) {
+ ServerGlobalParams::FeatureCompatibility::Version::kVersion47))) {
return Status(ErrorCodes::InvalidNamespace, str::stream() << "cannot write to " << ns);
}
return userAllowedCreateNS(ns);
diff --git a/src/mongo/db/pipeline/aggregation_request.cpp b/src/mongo/db/pipeline/aggregation_request.cpp
index d2a7b9d0fbb..60fe025772a 100644
--- a/src/mongo/db/pipeline/aggregation_request.cpp
+++ b/src/mongo/db/pipeline/aggregation_request.cpp
@@ -190,7 +190,7 @@ StatusWith<AggregationRequest> AggregationRequest::parseFromBSON(
auto writeConcern = uassertStatusOK(WriteConcernOptions::parse(elem.embeddedObject()));
request.setWriteConcern(writeConcern);
} else if (kRuntimeConstantsName == fieldName) {
- // TODO SERVER-46384: Remove 'runtimeConstants' in 4.5 since it is redundant with 'let'
+ // TODO SERVER-46384: Remove 'runtimeConstants' in 4.7 since it is redundant with 'let'
try {
IDLParserErrorContext ctx("internalRuntimeConstants");
request.setRuntimeConstants(RuntimeConstants::parse(ctx, elem.Obj()));
@@ -211,14 +211,15 @@ StatusWith<AggregationRequest> AggregationRequest::parseFromBSON(
str::stream() << kUse44SortKeysName << " must be a boolean, not a "
<< typeName(elem.type())};
}
- // TODO SERVER-47065: A 4.6 node still has to accept the 'use44SortKeys' field, since it
- // could be included in a command sent from a 4.4 mongos or 4.4 mongod. In 4.7, this
- // code to tolerate the 'use44SortKeys' field can be deleted.
+ // TODO SERVER-47065: A 4.7+ node still has to accept the 'use44SortKeys' field, since
+ // it could be included in a command sent from a 4.4 mongos or 4.4 mongod. When 5.0
+ // becomes last-lts, this code to tolerate the 'use44SortKeys' field can be deleted.
} else if (fieldName == "useNewUpsert"_sd) {
// TODO SERVER-46751: we must retain the ability to ingest the 'useNewUpsert' field for
- // 4.6 upgrade purposes, since a 4.4 mongoS will always send {useNewUpsert:true} to the
- // shards. We do nothing with it because useNewUpsert will be automatically used in 4.6
- // when appropriate. Remove this final vestige of useNewUpsert during the 4.7 dev cycle.
+ // 4.7+ upgrade purposes, since a 4.4 mongoS will always send {useNewUpsert:true} to the
+ // shards. We do nothing with it because useNewUpsert will be automatically used in 4.7+
+ // when appropriate. Remove this final vestige of useNewUpsert when 5.0 becomes
+ // last-lts.
} else if (fieldName == kIsMapReduceCommandName) {
if (elem.type() != BSONType::Bool) {
return {ErrorCodes::TypeMismatch,
diff --git a/src/mongo/db/pipeline/document_source_change_stream.cpp b/src/mongo/db/pipeline/document_source_change_stream.cpp
index 42b04ed8eb9..9405edb87a2 100644
--- a/src/mongo/db/pipeline/document_source_change_stream.cpp
+++ b/src/mongo/db/pipeline/document_source_change_stream.cpp
@@ -296,7 +296,7 @@ BSONObj DocumentSourceChangeStream::buildMatchFilter(
// TODO SERVER-44039: we continue to generate 'kNewShardDetected' events for compatibility
// with 4.2, even though we no longer rely on them to detect new shards. We may wish to remove
- // this mechanism in 4.6, or retain it for future cases where a change stream is targeted to a
+ // this mechanism in 4.7+, or retain it for future cases where a change stream is targeted to a
// subset of shards. See SERVER-44039 for details.
// 2.2) A chunk gets migrated to a new shard that doesn't have any chunks.
diff --git a/src/mongo/db/query/explain_options.cpp b/src/mongo/db/query/explain_options.cpp
index ed3b98d4d56..bb3939710f1 100644
--- a/src/mongo/db/query/explain_options.cpp
+++ b/src/mongo/db/query/explain_options.cpp
@@ -88,7 +88,7 @@ StatusWith<ExplainOptions::Verbosity> ExplainOptions::parseCmdBSON(const BSONObj
// TODO SERVER-48560: we ingest these fields for compatibility with 4.4,
// whose mongoS incorrectly adds them to the explain command for an
// aggregation instead of adding them into the wrapped aggregate command
- // itself. Remove this block when we branch for 4.8.
+ // itself. Remove this block when 5.0 becomes last-lts.
continue;
} else if (!isGenericArgument(fieldName)) {
return Status(ErrorCodes::InvalidOptions,
diff --git a/src/mongo/db/query/query_request.cpp b/src/mongo/db/query/query_request.cpp
index 4c72902b62d..b9601a5a1f8 100644
--- a/src/mongo/db/query/query_request.cpp
+++ b/src/mongo/db/query/query_request.cpp
@@ -368,9 +368,9 @@ StatusWith<std::unique_ptr<QueryRequest>> QueryRequest::parseFromFindCommand(
<< ". Unrecognized field '" << fieldName
<< "'. This command may be meant for a mongocryptd process.");
- // TODO SERVER-47065: A 4.6 node still has to accept the '_use44SortKeys' field, since
- // it could be included in a command sent from a 4.4 mongos. In 4.7 development, this
- // code to tolerate the '_use44SortKeys' field can be deleted.
+ // TODO SERVER-47065: A 4.7+ node still has to accept the '_use44SortKeys' field, since
+ // it could be included in a command sent from a 4.4 mongos. When 5.0 becomes last-lts,
+ // this code to tolerate the '_use44SortKeys' field can be deleted.
} else if (!isGenericArgument(fieldName)) {
return Status(ErrorCodes::FailedToParse,
str::stream() << "Failed to parse: " << cmdObj.toString() << ". "
diff --git a/src/mongo/db/repl/oplog.cpp b/src/mongo/db/repl/oplog.cpp
index a5c8109de41..203b68f7e96 100644
--- a/src/mongo/db/repl/oplog.cpp
+++ b/src/mongo/db/repl/oplog.cpp
@@ -1227,7 +1227,7 @@ Status applyOperation_inlock(OperationContext* opCtx,
request.setQuery(updateCriteria);
auto updateMod = write_ops::UpdateModification::parseFromOplogEntry(o);
if (updateMod.type() == write_ops::UpdateModification::Type::kDelta) {
- // We may only use delta oplog entries when in FCV 4.5 or in the "downgrading to
+ // We may only use delta oplog entries when in FCV 4.7 or in the "downgrading to
// 4.4" state. The latter case can happen when a $v:2 update is logged in the
// window between the oplog entry which sets the target FCV to 4.4 (putting the
// node in a "downgrading state") and the entry which removes the target FCV
@@ -1256,13 +1256,13 @@ Status applyOperation_inlock(OperationContext* opCtx,
const bool fromApplyOpsCmd = mode == OplogApplication::Mode::kApplyOpsCmd;
uassert(4773100,
- "Delta oplog entries may not be used in FCV below 4.5",
+ "Delta oplog entries may not be used in FCV below 4.7",
fcvVersion ==
- ServerGlobalParams::FeatureCompatibility::Version::kVersion451 ||
+ ServerGlobalParams::FeatureCompatibility::Version::kVersion47 ||
(!fromApplyOpsCmd &&
fcvVersion ==
ServerGlobalParams::FeatureCompatibility::Version::
- kDowngradingFrom451To44));
+ kDowngradingFrom47To44));
}
request.setUpdateModification(std::move(updateMod));
diff --git a/src/mongo/db/repl/repl_set_heartbeat_args_v1.cpp b/src/mongo/db/repl/repl_set_heartbeat_args_v1.cpp
index 1da6ec13f11..8169f1e3760 100644
--- a/src/mongo/db/repl/repl_set_heartbeat_args_v1.cpp
+++ b/src/mongo/db/repl/repl_set_heartbeat_args_v1.cpp
@@ -178,10 +178,10 @@ void ReplSetHeartbeatArgsV1::addToBSON(BSONObjBuilder* builder) const {
builder->appendIntOrLL(kSenderIdFieldName, _senderId);
builder->appendIntOrLL(kTermFieldName, _term);
- // TODO SERVER-49382: Remove this FCV check after we branch for 4.7.
+ // TODO SERVER-49382: Remove this FCV check when 5.0 becomes last-lts.
if (serverGlobalParams.featureCompatibility.isVersionInitialized() &&
serverGlobalParams.featureCompatibility.isGreaterThanOrEqualTo(
- ServerGlobalParams::FeatureCompatibility::Version::kVersion451)) {
+ ServerGlobalParams::FeatureCompatibility::Version::kVersion47)) {
builder->append(kPrimaryIdFieldName, _primaryId);
}
}
diff --git a/src/mongo/db/repl/replication_coordinator_impl.cpp b/src/mongo/db/repl/replication_coordinator_impl.cpp
index 83fe6464888..c521d3609c4 100644
--- a/src/mongo/db/repl/replication_coordinator_impl.cpp
+++ b/src/mongo/db/repl/replication_coordinator_impl.cpp
@@ -3152,8 +3152,9 @@ Status ReplicationCoordinatorImpl::processReplSetFreeze(int secs, BSONObjBuilder
}
bool ReplicationCoordinatorImpl::_supportsAutomaticReconfig() const {
+ // TODO SERVER-48545: Remove this when 5.0 becomes last-lts.
return serverGlobalParams.featureCompatibility.isGreaterThanOrEqualTo(
- ServerGlobalParams::FeatureCompatibility::Version::kVersion451);
+ ServerGlobalParams::FeatureCompatibility::Version::kVersion47);
}
Status ReplicationCoordinatorImpl::processReplSetReconfig(OperationContext* opCtx,
@@ -3363,7 +3364,8 @@ Status ReplicationCoordinatorImpl::doReplSetReconfig(OperationContext* opCtx,
int myIndex = _selfIndex;
lk.unlock();
- // Automatic reconfig ("newlyAdded" field in repl config) is supported only from FCV4.6+.
+ // TODO SERVER-48545: Remove this when 5.0 becomes last-lts.
+ // Automatic reconfig ("newlyAdded" field in repl config) is supported only from FCV4.7+.
// So, acquire FCV mutex lock in shared mode to block writers from modifying the fcv document
// to make sure fcv is not changed between getNewConfig() and storing the new config
// document locally.
@@ -3418,7 +3420,7 @@ Status ReplicationCoordinatorImpl::doReplSetReconfig(OperationContext* opCtx,
// We need to take fcv lock only for 2 cases:
// 1) For fcv 4.4, addition of new voter nodes.
- // 2) For fcv 4.6+, only if the current config doesn't contain the 'newlyAdded' field but the
+ // 2) For fcv 4.7+, only if the current config doesn't contain the 'newlyAdded' field but the
// new config got mutated to append 'newlyAdded' field.
if (force || !needsFcvLock()) {
fixedFcvRegion.release();
diff --git a/src/mongo/db/s/config/configsvr_shard_collection_command.cpp b/src/mongo/db/s/config/configsvr_shard_collection_command.cpp
index 45abe334f36..ee992bef2a9 100644
--- a/src/mongo/db/s/config/configsvr_shard_collection_command.cpp
+++ b/src/mongo/db/s/config/configsvr_shard_collection_command.cpp
@@ -98,8 +98,8 @@ void validateAndDeduceFullRequestOptions(OperationContext* opCtx,
numChunks >= 0 && numChunks <= maxNumInitialChunksForShards &&
numChunks <= maxNumInitialChunksTotal);
- // TODO (SERVER-48639): As of 4.6, this check is also performed on the shard itself, under the
- // critical section, so the code below should be removed in the 4.8 release.
+ // TODO (SERVER-48639): As of 4.7, this check is also performed on the shard itself, under the
+ // critical section, so the code below should be removed when 5.0 becomes last-lts.
//
// Ensure the collation is valid. Currently we only allow the simple collation.
bool simpleCollationSpecified = false;
diff --git a/src/mongo/db/s/config/sharding_catalog_manager_add_shard_test.cpp b/src/mongo/db/s/config/sharding_catalog_manager_add_shard_test.cpp
index 29e0011b2c1..de223d182b1 100644
--- a/src/mongo/db/s/config/sharding_catalog_manager_add_shard_test.cpp
+++ b/src/mongo/db/s/config/sharding_catalog_manager_add_shard_test.cpp
@@ -139,7 +139,7 @@ protected:
ASSERT_EQ(request.dbname, "admin");
ASSERT_BSONOBJ_EQ(request.cmdObj,
BSON("setFeatureCompatibilityVersion"
- << "4.5.1"
+ << "4.7"
<< "writeConcern" << writeConcern));
return response;
diff --git a/src/mongo/db/s/config/sharding_catalog_manager_shard_operations.cpp b/src/mongo/db/s/config/sharding_catalog_manager_shard_operations.cpp
index fbc5d0c6e51..38d0eb62a06 100644
--- a/src/mongo/db/s/config/sharding_catalog_manager_shard_operations.cpp
+++ b/src/mongo/db/s/config/sharding_catalog_manager_shard_operations.cpp
@@ -655,9 +655,9 @@ StatusWith<std::string> ShardingCatalogManager::addShard(
BSONObj setFCVCmd;
switch (serverGlobalParams.featureCompatibility.getVersion()) {
case ServerGlobalParams::FeatureCompatibility::kLatest:
- case ServerGlobalParams::FeatureCompatibility::Version::kUpgradingFrom44To451:
+ case ServerGlobalParams::FeatureCompatibility::Version::kUpgradingFrom44To47:
setFCVCmd = BSON(FeatureCompatibilityVersionCommandParser::kCommandName
- << FeatureCompatibilityVersionParser::kVersion451
+ << FeatureCompatibilityVersionParser::kVersion47
<< WriteConcernOptions::kWriteConcernField
<< opCtx->getWriteConcern().toBSON());
break;
diff --git a/src/mongo/db/s/get_shard_version_command.cpp b/src/mongo/db/s/get_shard_version_command.cpp
index a9e1d3aad62..42f3b200ac4 100644
--- a/src/mongo/db/s/get_shard_version_command.cpp
+++ b/src/mongo/db/s/get_shard_version_command.cpp
@@ -92,7 +92,8 @@ public:
"configServer",
Grid::get(opCtx)->shardRegistry()->getConfigServerConnectionString().toString());
- // Legacy boolean related to sharded connections. To remove in 4.8.
+ // TODO SERVER-50017: Legacy boolean related to sharded connections. To remove when 5.0
+ // becomes last-lts.
result.appendBool("inShardedMode", false);
result.appendTimestamp("mine", 0);
diff --git a/src/mongo/db/s/shardsvr_shard_collection.cpp b/src/mongo/db/s/shardsvr_shard_collection.cpp
index ed7bd0eb47f..b83b444f52f 100644
--- a/src/mongo/db/s/shardsvr_shard_collection.cpp
+++ b/src/mongo/db/s/shardsvr_shard_collection.cpp
@@ -680,10 +680,10 @@ public:
const NamespaceString nss(parseNs(dbname, cmdObj));
// TODO (SERVER-48639): Due to the way that '_configsvrShardCollection' processes the
- // collation parameter in 4.6 and earlier, the incoming request's collation can have the
+ // collation parameter in 5.0 and earlier, the incoming request's collation can have the
// following states:
//
- // - Boost::none: (not possible before 4.7 development) The end user's request did not
+ // - Boost::none: (not possible before 5.1 development) The end user's request did not
// specify a collation
// - Empty BSON : Either the end user did not specify a collation and the collection did
// not exist when '_configsvrShardCollection' was called, or the collection
diff --git a/src/mongo/db/s/unset_sharding_command.cpp b/src/mongo/db/s/unset_sharding_command.cpp
index 79df992856e..2c7b920ca23 100644
--- a/src/mongo/db/s/unset_sharding_command.cpp
+++ b/src/mongo/db/s/unset_sharding_command.cpp
@@ -42,7 +42,7 @@
namespace mongo {
namespace {
-// No-op command; deprecated as of v4.6.
+// No-op command; deprecated as of v4.7.
class UnsetShardingCommand : public BasicCommand {
public:
UnsetShardingCommand() : BasicCommand("unsetSharding") {}
diff --git a/src/mongo/db/server_options.h b/src/mongo/db/server_options.h
index 5e451140636..e14567243cb 100644
--- a/src/mongo/db/server_options.h
+++ b/src/mongo/db/server_options.h
@@ -156,9 +156,9 @@ struct ServerGlobalParams {
struct FeatureCompatibility {
/**
- * The combination of the fields (version, targetVersion) in the featureCompatiiblityVersion
- * document in the server configuration collection (admin.system.version) are represented by
- * this enum and determine this node's behavior.
+ * The combination of the fields (version, targetVersion, previousVersion) in the
+ * featureCompatiiblityVersion document in the server configuration collection
+ * (admin.system.version) are represented by this enum and determine this node's behavior.
*
* Features can be gated for specific versions, or ranges of versions above or below some
* minimum or maximum version, respectively.
@@ -166,28 +166,26 @@ struct ServerGlobalParams {
* The legal enum (and featureCompatibilityVersion document) states are:
*
* kFullyDowngradedTo44
- * (4.4, Unset): Only 4.4 features are available, and new and existing storage
- * engine entries use the 4.4 format
+ * (4.4, Unset, Unset): Only 4.4 features are available, and new and existing storage engine
+ * entries use the 4.4 format
*
- * kUpgradingFrom44To451
- * (4.4, 4.5.1): Only 4.4 features are available, but new storage engine entries
- * use the 4.5.1 format, and existing entries may have either the
- * 4.4 or 4.5.1 format
+ * kUpgradingFrom44To47
+ * (4.4, 4.7, Unset): Only 4.4 features are available, but new storage engine entries
+ * use the 4.7 format, and existing entries may have either the 4.4 or
+ * 4.7 format
*
- * kVersion451
- * (4.5.1, Unset): 4.5.1 features are available, and new and existing storage
- * engine entries use the 4.5.1 format
+ * kVersion47
+ * (4.7, Unset, Unset): 4.7 features are available, and new and existing storage engine
+ * entries use the 4.7 format
*
- * kDowngradingFrom451To44
- * (4.4, 4.4): Only 4.4 features are available and new storage engine
- * entries use the 4.4 format, but existing entries may have
- * either the 4.4 or 4.5.1 format
+ * kDowngradingFrom47To44
+ * (4.4, 4.4, 4.7): Only 4.4 features are available and new storage engine entries use the
+ * 4.4 format, but existing entries may have either the 4.4 or 4.7 format
*
* kUnsetDefault44Behavior
- * (Unset, Unset): This is the case on startup before the fCV document is
- * loaded into memory. isVersionInitialized() will return
- * false, and getVersion() will return the default
- * (kFullyDowngradedTo44).
+ * (Unset, Unset, Unset): This is the case on startup before the fCV document is loaded into
+ * memory. isVersionInitialized() will return false, and getVersion()
+ * will return the default (kUnsetDefault44Behavior).
*
*/
enum class Version {
@@ -196,26 +194,26 @@ struct ServerGlobalParams {
// lower than some maximum, respectively.
kUnsetDefault44Behavior = 0,
kFullyDowngradedTo44 = 1,
- kDowngradingFrom451To44 = 2,
- kUpgradingFrom44To451 = 3,
- kVersion451 = 4,
+ kDowngradingFrom47To44 = 2,
+ kUpgradingFrom44To47 = 3,
+ kVersion47 = 4,
};
// These constants should only be used for generic FCV references. Generic references are
// FCV references that are expected to exist across LTS binary versions.
- static constexpr Version kLatest = Version::kVersion451;
+ static constexpr Version kLatest = Version::kVersion47;
static constexpr Version kLastContinuous = Version::kFullyDowngradedTo44;
static constexpr Version kLastLTS = Version::kFullyDowngradedTo44;
// These constants should only be used for generic FCV references. Generic references are
// FCV references that are expected to exist across LTS binary versions.
// NOTE: DO NOT USE THEM FOR REGULAR FCV CHECKS.
- static constexpr Version kUpgradingFromLastLTSToLatest = Version::kUpgradingFrom44To451;
+ static constexpr Version kUpgradingFromLastLTSToLatest = Version::kUpgradingFrom44To47;
static constexpr Version kUpgradingFromLastContinuousToLatest =
- Version::kUpgradingFrom44To451;
- static constexpr Version kDowngradingFromLatestToLastLTS = Version::kDowngradingFrom451To44;
+ Version::kUpgradingFrom44To47;
+ static constexpr Version kDowngradingFromLatestToLastLTS = Version::kDowngradingFrom47To44;
static constexpr Version kDowngradingFromLatestToLastContinuous =
- Version::kDowngradingFrom451To44;
+ Version::kDowngradingFrom47To44;
/**
* On startup, the featureCompatibilityVersion may not have been explicitly set yet. This
diff --git a/src/mongo/db/startup_recovery.cpp b/src/mongo/db/startup_recovery.cpp
index c7be25d6e87..b2afe36cb13 100644
--- a/src/mongo/db/startup_recovery.cpp
+++ b/src/mongo/db/startup_recovery.cpp
@@ -194,8 +194,7 @@ Status buildMissingIdIndex(OperationContext* opCtx, Collection* collection) {
auto downgradeError =
Status{ErrorCodes::MustDowngrade,
str::stream() << "UPGRADE PROBLEM: The data files need to be fully upgraded to version "
- "4.4 before attempting "
- "an upgrade to 4.5.1; see "
+ "4.4 before attempting a binary upgrade; see "
<< feature_compatibility_version_documentation::kUpgradeLink
<< " for more details."};
diff --git a/src/mongo/db/storage/storage_engine_impl.cpp b/src/mongo/db/storage/storage_engine_impl.cpp
index 45bf7d03dd2..1823a83e953 100644
--- a/src/mongo/db/storage/storage_engine_impl.cpp
+++ b/src/mongo/db/storage/storage_engine_impl.cpp
@@ -933,7 +933,7 @@ bool StorageEngineImpl::supportsResumableIndexBuilds() const {
return enableResumableIndexBuilds && supportsReadConcernMajority() && !isEphemeral() &&
serverGlobalParams.featureCompatibility.isVersionInitialized() &&
serverGlobalParams.featureCompatibility.isGreaterThanOrEqualTo(
- ServerGlobalParams::FeatureCompatibility::Version::kVersion451) &&
+ ServerGlobalParams::FeatureCompatibility::Version::kVersion47) &&
!repl::ReplSettings::shouldRecoverFromOplogAsStandalone();
}
diff --git a/src/mongo/db/update/update_driver.cpp b/src/mongo/db/update/update_driver.cpp
index c66512526a8..e0cf8dafb4c 100644
--- a/src/mongo/db/update/update_driver.cpp
+++ b/src/mongo/db/update/update_driver.cpp
@@ -274,7 +274,7 @@ Status UpdateDriver::update(OperationContext* opCtx,
if (_logOp && logOpRec) {
const auto& fcv = serverGlobalParams.featureCompatibility;
const bool fcvAllowsV2Entries = fcv.isVersionInitialized() &&
- fcv.getVersion() == ServerGlobalParams::FeatureCompatibility::Version::kVersion451;
+ fcv.getVersion() == ServerGlobalParams::FeatureCompatibility::Version::kVersion47;
applyParams.logMode = fcvAllowsV2Entries && internalQueryEnableLoggingV2OplogEntries.load()
? ApplyParams::LogMode::kGenerateOplogEntry
diff --git a/src/mongo/db/update/update_oplog_entry_version.h b/src/mongo/db/update/update_oplog_entry_version.h
index 8ae9ec069fd..5338ddcc76e 100644
--- a/src/mongo/db/update/update_oplog_entry_version.h
+++ b/src/mongo/db/update/update_oplog_entry_version.h
@@ -50,7 +50,7 @@ enum class UpdateOplogEntryVersion {
// arrayFilters and $[] syntax.
kUpdateNodeV1 = 1,
- // Delta style update, introduced in 4.6. When a pipeline based update is executed, the pre and
+ // Delta style update, introduced in 4.7. When a pipeline based update is executed, the pre and
// post images are diffed, producing a delta. The delta is recorded in the oplog. On
// secondaries, the delta is applied to the pre-image to recover the post image.
//
diff --git a/src/mongo/db/vector_clock.cpp b/src/mongo/db/vector_clock.cpp
index b45badf38c3..d39c281397d 100644
--- a/src/mongo/db/vector_clock.cpp
+++ b/src/mongo/db/vector_clock.cpp
@@ -162,7 +162,7 @@ public:
Component component) const override {
if (serverGlobalParams.featureCompatibility.isVersionInitialized() &&
serverGlobalParams.featureCompatibility.isGreaterThanOrEqualTo(
- ServerGlobalParams::FeatureCompatibility::Version::kVersion451)) {
+ ServerGlobalParams::FeatureCompatibility::Version::kVersion47)) {
return ActualFormat::out(service, opCtx, permitRefresh, out, time, component);
}
return false;
diff --git a/src/mongo/db/wire_version.h b/src/mongo/db/wire_version.h
index c1ab737b586..736038f42ea 100644
--- a/src/mongo/db/wire_version.h
+++ b/src/mongo/db/wire_version.h
@@ -83,12 +83,12 @@ enum WireVersion {
// Supports resumable initial sync (4.4+).
RESUMABLE_INITIAL_SYNC = 9,
- // Supports features available from 4.5.1 and onwards.
- WIRE_VERSION_451 = 10,
+ // Supports features available from 4.7 and onwards.
+ WIRE_VERSION_47 = 10,
// Set this to the highest value in this enum - it will be the default maxWireVersion for
// the WireSpec values.
- LATEST_WIRE_VERSION = WIRE_VERSION_451,
+ LATEST_WIRE_VERSION = WIRE_VERSION_47,
// Set this to LATEST_WIRE_VERSION - 1.
LAST_CONT_WIRE_VERSION = LATEST_WIRE_VERSION - 1,
diff --git a/src/mongo/s/commands/cluster_reset_error_cmd.cpp b/src/mongo/s/commands/cluster_reset_error_cmd.cpp
index b57e60ac679..eb7854842ad 100644
--- a/src/mongo/s/commands/cluster_reset_error_cmd.cpp
+++ b/src/mongo/s/commands/cluster_reset_error_cmd.cpp
@@ -41,7 +41,7 @@
namespace mongo {
namespace {
-// This commmand is deprecated and is currently a no-op as of v4.6.
+// This commmand is deprecated and is currently a no-op as of v4.7.
class CmdShardingResetError : public BasicCommand {
public:
diff --git a/src/mongo/s/commands/cluster_set_feature_compatibility_version_cmd.cpp b/src/mongo/s/commands/cluster_set_feature_compatibility_version_cmd.cpp
index ab77d891cd8..6176e1ad7be 100644
--- a/src/mongo/s/commands/cluster_set_feature_compatibility_version_cmd.cpp
+++ b/src/mongo/s/commands/cluster_set_feature_compatibility_version_cmd.cpp
@@ -73,11 +73,11 @@ public:
using FCVP = FeatureCompatibilityVersionParser;
return str::stream()
<< "Set the featureCompatibilityVersion used by this cluster. If set to '"
- << FCVP::kVersion44 << "', then " << FCVP::kVersion451
- << " features are disabled. If set to '" << FCVP::kVersion451 << "', then "
- << FCVP::kVersion451
+ << FCVP::kVersion44 << "', then " << FCVP::kVersion47
+ << " features are disabled. If set to '" << FCVP::kVersion47 << "', then "
+ << FCVP::kVersion47
<< " features are enabled, and all nodes in the cluster must be binary version "
- << FCVP::kVersion451 << ". See "
+ << FCVP::kVersion47 << ". See "
<< feature_compatibility_version_documentation::kCompatibilityLink << ".";
}
diff --git a/src/mongo/s/mongos_main.cpp b/src/mongo/s/mongos_main.cpp
index 2b914b2a140..17bafd0dc42 100644
--- a/src/mongo/s/mongos_main.cpp
+++ b/src/mongo/s/mongos_main.cpp
@@ -288,10 +288,10 @@ void cleanupTask(const ShutdownTaskArgs& shutdownArgs) {
// At this point, we will start responding to any isMaster request with ShutdownInProgress
// so that clients can re-route their operations.
//
- // TODO SERVER-49138: Remove this FCV check once we branch for 4.8.
+ // TODO SERVER-49138: Remove this FCV check when 5.0 becomes last-lts.
if (serverGlobalParams.featureCompatibility.isVersionInitialized() &&
serverGlobalParams.featureCompatibility.isGreaterThanOrEqualTo(
- ServerGlobalParams::FeatureCompatibility::Version::kVersion451);
+ ServerGlobalParams::FeatureCompatibility::Version::kVersion47);
auto mongosTopCoord = MongosTopologyCoordinator::get(opCtx)) {
mongosTopCoord->enterQuiesceModeAndWait(opCtx, quiesceTime);
}
diff --git a/src/mongo/s/query/document_source_update_on_add_shard.cpp b/src/mongo/s/query/document_source_update_on_add_shard.cpp
index 670c3201d45..4764b7c4764 100644
--- a/src/mongo/s/query/document_source_update_on_add_shard.cpp
+++ b/src/mongo/s/query/document_source_update_on_add_shard.cpp
@@ -45,8 +45,8 @@ namespace {
bool isShardConfigEvent(const Document& eventDoc) {
// TODO SERVER-44039: we continue to generate 'kNewShardDetected' events for compatibility
// with 4.2, even though we no longer rely on them to detect new shards. We swallow the event
- // here. We may wish to remove this mechanism entirely 4.6, or retain it for future cases where
- // a change stream is targeted to a subset of shards. See SERVER-44039 for details.
+ // here. We may wish to remove this mechanism entirely in 4.7+, or retain it for future cases
+ // where a change stream is targeted to a subset of shards. See SERVER-44039 for details.
if (eventDoc[DocumentSourceChangeStream::kOperationTypeField].getStringData() ==
DocumentSourceChangeStream::kNewShardDetectedOpType) {
return true;
diff --git a/src/mongo/s/request_types/set_shard_version_request.cpp b/src/mongo/s/request_types/set_shard_version_request.cpp
index 208d88b66fa..de6d902b6cf 100644
--- a/src/mongo/s/request_types/set_shard_version_request.cpp
+++ b/src/mongo/s/request_types/set_shard_version_request.cpp
@@ -46,7 +46,7 @@ const char kCmdName[] = "setShardVersion";
const char kForceRefresh[] = "forceRefresh";
const char kAuthoritative[] = "authoritative";
const char kNoConnectionVersioning[] =
- "noConnectionVersioning"; // TODO (SERVER-47956): Remove after 4.6 is released
+ "noConnectionVersioning"; // TODO (SERVER-47956): Remove after 5.0 becomes last-lts.
} // namespace
diff --git a/src/mongo/shell/feature_compatibility_version.js b/src/mongo/shell/feature_compatibility_version.js
index bd7b1dfe93e..1c2c727be33 100644
--- a/src/mongo/shell/feature_compatibility_version.js
+++ b/src/mongo/shell/feature_compatibility_version.js
@@ -10,7 +10,7 @@
* multiple times.
*/
-var latestFCV = "4.5.1";
+var latestFCV = "4.7";
var lastContinuousFCV = "4.4";
var lastLTSFCV = "4.4";
// The number of versions since the last-lts version. When numVersionsSinceLastLTS = 1,