summaryrefslogtreecommitdiff
path: root/src/mongo
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo')
-rw-r--r--src/mongo/db/s/config/configsvr_configure_collection_auto_split.cpp5
-rw-r--r--src/mongo/s/catalog/type_collection.h2
-rw-r--r--src/mongo/s/catalog/type_collection.idl2
-rw-r--r--src/mongo/s/request_types/configure_collection_auto_split.idl6
4 files changed, 13 insertions, 2 deletions
diff --git a/src/mongo/db/s/config/configsvr_configure_collection_auto_split.cpp b/src/mongo/db/s/config/configsvr_configure_collection_auto_split.cpp
index 6286ae55baf..a27a84b141d 100644
--- a/src/mongo/db/s/config/configsvr_configure_collection_auto_split.cpp
+++ b/src/mongo/db/s/config/configsvr_configure_collection_auto_split.cpp
@@ -64,6 +64,11 @@ public:
str::stream() << Request::kCommandName << " can only be run on config servers",
serverGlobalParams.clusterRole == ClusterRole::ConfigServer);
+ uassert(8423309,
+ "_configsvrConfigureAutoSplit command not supported",
+ mongo::feature_flags::gShardingPerCollectionAutoSplitter.isEnabled(
+ serverGlobalParams.featureCompatibility));
+
const NamespaceString& nss = ns();
uassert(ErrorCodes::InvalidNamespace,
diff --git a/src/mongo/s/catalog/type_collection.h b/src/mongo/s/catalog/type_collection.h
index a903da4d224..fb032a94f72 100644
--- a/src/mongo/s/catalog/type_collection.h
+++ b/src/mongo/s/catalog/type_collection.h
@@ -145,7 +145,7 @@ public:
void setMaxChunkSizeBytes(int64_t value);
bool getAllowAutoSplit() const {
- return !getNoAutoSplit();
+ return !getNoAutoSplit().get_value_or(false);
}
bool getAllowBalance() const {
diff --git a/src/mongo/s/catalog/type_collection.idl b/src/mongo/s/catalog/type_collection.idl
index 10612997ec8..acff4f93d88 100644
--- a/src/mongo/s/catalog/type_collection.idl
+++ b/src/mongo/s/catalog/type_collection.idl
@@ -113,7 +113,7 @@ structs:
noAutoSplit:
type: bool
description: "Specifies whether the auto-splitter should be running or not for this collection."
- default: false
+ optional: true
noBalance:
type: bool
description: "Consulted by the Balancer only and indicates whether this collection
diff --git a/src/mongo/s/request_types/configure_collection_auto_split.idl b/src/mongo/s/request_types/configure_collection_auto_split.idl
index 0a3121d8256..f4ccc578ff0 100644
--- a/src/mongo/s/request_types/configure_collection_auto_split.idl
+++ b/src/mongo/s/request_types/configure_collection_auto_split.idl
@@ -34,6 +34,12 @@ global:
imports:
- "mongo/idl/basic_types.idl"
+feature_flags:
+ featureFlagPerCollectionAutoSplitter:
+ description: "Add capability to configure per collection auto-splitter settings."
+ cpp_varname: feature_flags::gShardingPerCollectionAutoSplitter
+ default: false
+
structs:
configure_auto_split_params:
description: "Parameters for configureCollectionAutoSplitter command"