From 9007e15d7fa70d3881b4758aa46932081ee7cb70 Mon Sep 17 00:00:00 2001 From: Andrew Wong Date: Mon, 8 Jul 2024 15:22:57 -0700 Subject: [PATCH] cluster: add clarifying comment on setting remote label Adds a comment explaining the condition with which we set a remote label. This is follow-up to https://github.com/redpanda-data/redpanda/pull/20778 --- src/v/cluster/topics_frontend.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/v/cluster/topics_frontend.cc b/src/v/cluster/topics_frontend.cc index 1da0e6d1d9e71..b4b21462fb84b 100644 --- a/src/v/cluster/topics_frontend.cc +++ b/src/v/cluster/topics_frontend.cc @@ -560,6 +560,12 @@ ss::future topics_frontend::do_create_topic( bool configured_label_from_manifest = assignable_config.is_read_replica() || assignable_config.is_recovery_enabled(); + // We set a remote label if: + // - we haven't got a remote label from the cloud (i.e. this isn't a read + // replica or recovery topic), + // - there is a cluster UUID (always expected), + // - the remote labels feature is active, + // - the config to disable remote labels is False if ( !configured_label_from_manifest && !assignable_config.cfg.properties.remote_label.has_value()