From ef3e02021fe928a01f94e33bcea16ff6fc83c5e6 Mon Sep 17 00:00:00 2001 From: Willem Kaufmann Date: Wed, 29 Jul 2026 15:07:17 -0400 Subject: [PATCH 1/3] `config`: fix `leader_balancer_node_mute_timeout` name Copy pasta error? (cherry picked from commit 18aa82f18a1668bc7903dd50a842902e2fb2652a) --- src/v/config/configuration.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/v/config/configuration.cc b/src/v/config/configuration.cc index 93d52ba940420..6251fec3f54ed 100644 --- a/src/v/config/configuration.cc +++ b/src/v/config/configuration.cc @@ -3543,7 +3543,7 @@ configuration::configuration() 5min) , leader_balancer_node_mute_timeout( *this, - "leader_balancer_mute_timeout", + "leader_balancer_node_mute_timeout", "Leadership rebalancing node mute timeout.", {.needs_restart = needs_restart::no, .visibility = visibility::tunable}, 20s) From 29af9165998e9a9cda19b74f039d34b04c80ad62 Mon Sep 17 00:00:00 2001 From: Willem Kaufmann Date: Wed, 29 Jul 2026 15:11:23 -0400 Subject: [PATCH 2/3] `config`: fix `default_topic_replications` config property I'm choosing to fix this by changing the variable name rather than the property name, for backwards compatibility. (cherry picked from commit 9c71f3bcf475391685e6c66e549fb99e68389383) --- src/v/cluster_link/service.cc | 2 +- src/v/config/configuration.cc | 2 +- src/v/config/configuration.h | 2 +- src/v/kafka/server/handlers/configs/config_response_utils.cc | 4 ++-- src/v/kafka/server/handlers/create_topics.cc | 2 +- src/v/kafka/server/handlers/metadata.cc | 2 +- src/v/pandaproxy/schema_registry/configuration.cc | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/v/cluster_link/service.cc b/src/v/cluster_link/service.cc index 73a61b6d376c7..132a9f72a041d 100644 --- a/src/v/cluster_link/service.cc +++ b/src/v/cluster_link/service.cc @@ -1308,7 +1308,7 @@ ss::future<> service::maybe_start_manager() { *_schema_registry_dest, source_sr_prober::make_default()), &_controller->get_feature_table(), 30s, // Temporary until we have a proper configuration for this - config::shard_local_cfg().default_topic_replication.bind(), + config::shard_local_cfg().default_topic_replications.bind(), _scheduling_group); co_await _manager->register_task_factory(); co_await _manager->register_task_factory(); diff --git a/src/v/config/configuration.cc b/src/v/config/configuration.cc index 6251fec3f54ed..aaec164523d1f 100644 --- a/src/v/config/configuration.cc +++ b/src/v/config/configuration.cc @@ -1175,7 +1175,7 @@ configuration::configuration() "Number of partitions in the internal group membership topic.", {.needs_restart = needs_restart::no, .visibility = visibility::tunable}, 16) - , default_topic_replication( + , default_topic_replications( *this, "default_topic_replications", "Default replication factor for new topics.", diff --git a/src/v/config/configuration.h b/src/v/config/configuration.h index 7e99beaf15eae..a12cf70659a91 100644 --- a/src/v/config/configuration.h +++ b/src/v/config/configuration.h @@ -258,7 +258,7 @@ struct configuration final : public config_store { // same as retention.size in kafka - TODO: size not implemented property> retention_bytes; property group_topic_partitions; - bounded_property default_topic_replication; + bounded_property default_topic_replications; bounded_property minimum_topic_replication; property transaction_coordinator_partitions; property diff --git a/src/v/kafka/server/handlers/configs/config_response_utils.cc b/src/v/kafka/server/handlers/configs/config_response_utils.cc index afba408acb0d3..4095ad8e3ae55 100644 --- a/src/v/kafka/server/handlers/configs/config_response_utils.cc +++ b/src/v/kafka/server/handlers/configs/config_response_utils.cc @@ -1315,11 +1315,11 @@ config_response_container_t make_broker_configs( config_keys, result, "default.replication.factor", - config::shard_local_cfg().default_topic_replication, + config::shard_local_cfg().default_topic_replications, include_synonyms, maybe_make_documentation( include_documentation, - config::shard_local_cfg().default_topic_replication.desc()), + config::shard_local_cfg().default_topic_replications.desc()), &describe_as_string); add_broker_config_if_requested( diff --git a/src/v/kafka/server/handlers/create_topics.cc b/src/v/kafka/server/handlers/create_topics.cc index f1fa8ea80aba0..3e4963f5d845b 100644 --- a/src/v/kafka/server/handlers/create_topics.cc +++ b/src/v/kafka/server/handlers/create_topics.cc @@ -309,7 +309,7 @@ ss::future create_topics_handler::handle( } if (r.replication_factor == -1) { r.replication_factor - = config::shard_local_cfg().default_topic_replication(); + = config::shard_local_cfg().default_topic_replications(); } } diff --git a/src/v/kafka/server/handlers/metadata.cc b/src/v/kafka/server/handlers/metadata.cc index 9fc3dcf81e434..0af62a8161ee6 100644 --- a/src/v/kafka/server/handlers/metadata.cc +++ b/src/v/kafka/server/handlers/metadata.cc @@ -245,7 +245,7 @@ autocreate_topic_configuration(request_context& ctx, model::topic topic) { model::kafka_namespace, std::move(topic), config::shard_local_cfg().default_topic_partitions(), - config::shard_local_cfg().default_topic_replication()}; + config::shard_local_cfg().default_topic_replications()}; // Need to respect the default_redpanda_storage_mode when autocreating a // topic. cfg.properties.storage_mode diff --git a/src/v/pandaproxy/schema_registry/configuration.cc b/src/v/pandaproxy/schema_registry/configuration.cc index 174578142d5da..3b3b3c32412f9 100644 --- a/src/v/pandaproxy/schema_registry/configuration.cc +++ b/src/v/pandaproxy/schema_registry/configuration.cc @@ -46,7 +46,7 @@ configuration::configuration() *this, "schema_registry_replication_factor", "Replication factor for internal `_schemas` topic. If unset, defaults " - "to `default_topic_replication`.", + "to `default_topic_replications`.", {}, std::nullopt) , api_doc_dir( From 74ff1f13d29ec978ebfe9584956722bc85b3119f Mon Sep 17 00:00:00 2001 From: Willem Kaufmann Date: Wed, 29 Jul 2026 15:27:01 -0400 Subject: [PATCH 3/3] `config`: assert on double registered property names This is certainly a bug to hit in prod. This assert would have caught the accidental double registeration of `leader_balancer_mute_timeout` due to a typo fixed in a previous commit. (cherry picked from commit 1d9ef9c3e5345b2688a4b8414e0ab1bc0d5826da) --- src/v/config/base_property.cc | 11 ++++++++--- src/v/config/tests/bounded_property_test.cc | 2 +- src/v/config/tests/enterprise_property_test.cc | 2 +- src/v/features/tests/enterprise_features_test.cc | 2 +- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/v/config/base_property.cc b/src/v/config/base_property.cc index 9b2f35f841f6c..7e1fe4d498b7c 100644 --- a/src/v/config/base_property.cc +++ b/src/v/config/base_property.cc @@ -46,11 +46,16 @@ base_property::base_property( base_property::metadata meta) : _meta(intern_metadata(name, desc, std::move(meta))) , _conf(&conf) { - conf._properties.emplace(_meta->name, this); + auto inserted = conf._properties.emplace(_meta->name, this).second; + vassert( + inserted, + "Two properties tried to register the same name {}", + _meta->name); for (const auto& alias : _meta->aliases) { - auto [_, inserted] = conf._aliases.emplace(alias, this); + auto alias_inserted = conf._aliases.emplace(alias, this).second; - vassert(inserted, "Two properties tried to register the same alias"); + vassert( + alias_inserted, "Two properties tried to register the same alias"); } } diff --git a/src/v/config/tests/bounded_property_test.cc b/src/v/config/tests/bounded_property_test.cc index dc484e1d1ada9..72606794cb0ca 100644 --- a/src/v/config/tests/bounded_property_test.cc +++ b/src/v/config/tests/bounded_property_test.cc @@ -79,7 +79,7 @@ struct test_config : public config::config_store { {.min = 5ms}) , minmax_bounded_opt_ms( *this, - "bounded_opt_ms", + "minmax_bounded_opt_ms", "An optional duration", {}, std::nullopt, diff --git a/src/v/config/tests/enterprise_property_test.cc b/src/v/config/tests/enterprise_property_test.cc index 5e689b9726d29..4a2ee1153c347 100644 --- a/src/v/config/tests/enterprise_property_test.cc +++ b/src/v/config/tests/enterprise_property_test.cc @@ -61,7 +61,7 @@ struct test_config : public config_store { , enterprise_enum( *this, std::vector{tls_version::v1_3}, - "enterprise_str_enum", + "enterprise_enum", "An enterprise-only enum property", meta{.needs_restart = needs_restart::no}, tls_version::v1_1, diff --git a/src/v/features/tests/enterprise_features_test.cc b/src/v/features/tests/enterprise_features_test.cc index 4597ea8469574..a714274249637 100644 --- a/src/v/features/tests/enterprise_features_test.cc +++ b/src/v/features/tests/enterprise_features_test.cc @@ -62,7 +62,7 @@ struct test_config : public config_store { , enterprise_enum( *this, std::vector{tls_version::v1_3}, - "enterprise_str_enum", + "enterprise_enum", "An enterprise-only enum property", meta{.needs_restart = needs_restart::no}, tls_version::v1_1,