From 6cccb16c5185b08c2563d02d001ecbdc0edf4f72 Mon Sep 17 00:00:00 2001 From: Willem Kaufmann Date: Thu, 30 Jan 2025 17:18:00 -0500 Subject: [PATCH] `config`: remove `shard_local_cfg` checks for `tombstone_retention_ms` These checks are invalid, as cluster config changes are applied one by one. A user could edit multiple properties at once to a valid state, and be caught by this attempted validation with an outdated value in the `shard_local_cfg()`. Multi-property validation of this cluster property is already handled in `server.cc`, see `config_multi_property_validation()`. --- src/v/config/validators.cc | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/src/v/config/validators.cc b/src/v/config/validators.cc index c1d4a364ad766..9f632ab2fa98b 100644 --- a/src/v/config/validators.cc +++ b/src/v/config/validators.cc @@ -226,28 +226,6 @@ validate_api_endpoint(const std::optional& os) { std::optional validate_tombstone_retention_ms( const std::optional& ms) { if (ms.has_value()) { - // For simplicity's sake, cloud storage enable/read/write permissions - // cannot be enabled at the same time as tombstone_retention_ms at the - // cluster level, to avoid the case in which redpanda refuses to create - // new, misconfigured topics due to cluster defaults - const auto& cloud_storage_enabled - = config::shard_local_cfg().cloud_storage_enabled; - const auto& cloud_storage_remote_write - = config::shard_local_cfg().cloud_storage_enable_remote_write; - const auto& cloud_storage_remote_read - = config::shard_local_cfg().cloud_storage_enable_remote_read; - if ( - cloud_storage_enabled() || cloud_storage_remote_write() - || cloud_storage_remote_read()) { - return fmt::format( - "cannot set {} if any of ({}, {}, {}) are enabled at the cluster " - "level", - config::shard_local_cfg().tombstone_retention_ms.name(), - cloud_storage_enabled.name(), - cloud_storage_remote_write.name(), - cloud_storage_remote_read.name()); - } - if (ms.value() < 1ms || ms.value() > serde::max_serializable_ms) { return fmt::format( "tombstone_retention_ms should be in range: [1, {}]",