You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Nelson B. (Jira)" <ji...@apache.org> on 2024/08/23 21:26:00 UTC
[jira] [Closed] (KAFKA-17404) Return the actual controller id or -1 instead of a random broker id when calling DescribeCluster or TopicMetadata APIs. .
[ https://issues.apache.org/jira/browse/KAFKA-17404?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Nelson B. closed KAFKA-17404.
-----------------------------
> Return the actual controller id or -1 instead of a random broker id when calling DescribeCluster or TopicMetadata APIs. .
> -------------------------------------------------------------------------------------------------------------------------
>
> Key: KAFKA-17404
> URL: https://issues.apache.org/jira/browse/KAFKA-17404
> Project: Kafka
> Issue Type: Improvement
> Reporter: Nelson B.
> Priority: Minor
>
> Currently, when the `DescribeCluster` API with `EntityType=1` or the `TopicMetadata` API is called, the controller ID value in the response is set to a random broker ID. I'm not sure but I think this approach was used because, before KIP-919, clients couldn't communicate directly with the controller and had to route through a broker. Therefore, the specific broker used to reach the controller didn't matter. However, after KIP-919, it would be more appropriate to return the actual controller ID if the node also serves as a broker. Otherwise, return -1 to avoid confusing users.
> *Summary:*
> _AS-IS:_
> - `DescribeCluster` with `EntityType=1` or `TopicMetadata` request -> controller ID is set to a random broker ID.
> _TO-BE:_
> - `DescribeCluster` with `EntityType=1` or `TopicMetadata` request -> controller ID is set to the actual controller ID if it also serves as a broker; otherwise, return -1.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)