-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DescribeCluster() returns random broker ID as the controller ID under KRaft mode #2521
Comments
Note that everything is working fine in ZooKeeper mode, and it looks like sarama is just not compatible with KRaft yet. It'd be appreciated if the community can provide some insights |
@panyuenlau this is actually an intentional behaviour in the server-side kraft code. See https://github.com/apache/kafka/blob/b2dea17041157ceee741041d23783ff993b88ef1/core/src/main/scala/kafka/server/metadata/KRaftMetadataCache.scala#L290-L305
Kafka just expects you to send your requests to any node in the cluster and it will be load balanced accordingly |
Hey @dnwe - thanks for the info. I understand that Kafka itself doesn't want clients to have direct access to the quorum controllers, however, shouldn't an admin have the right to know about the quorum controllers? For example, can sarama leverage this https://github.com/apache/kafka/blob/3.4.1/clients/src/main/java/org/apache/kafka/clients/admin/Admin.java#L1482-L1509? |
@panyuenlau sure, in the future we will of course add the DescribeQuorumRequest and Response protocol and we can expose this for the metadata topic in the admin.go code in the same way as it is for Java, but afaik this is just informative rather than actually being used by the client to make any choices |
Alrighty, thank you for the response! @dnwe Shall I keep the issue open? If not, please feel free to close it |
Actually - I just noticed that there is a KIP currently under discussion and it ties to what we are discussing here: KIP-919 |
Good find. Yes let’s keep this issue open for now. For one, I’d like to add an FVT matrix that uses Kraft mode anyway and two, we should at least document in the admin client that controllerID is random in Kraft mode. Adding the metadata quorum protocol will happen over time as part of our general bringup of new protocol which is work in progress in the background |
Versions
Please specify real version numbers or git SHAs, not just "Latest" since that changes fairly regularly.
Main logic:
How kafka admin client is set up:
There is no error while setting up the admin client, but what I obtained from
kClient.DescribeCluster()
is just a random broker ID from my Kafka cluster with 3 quorum voters and 3 regular brokers and the returned brokers list is just a list of empty structs, example logs from my program above:Actual state of my Kafka cluster:
The text was updated successfully, but these errors were encountered: