akhileshchg commented on code in PR #12961:
URL: https://github.com/apache/kafka/pull/12961#discussion_r1050074366
##########
core/src/main/scala/kafka/server/KafkaApis.scala:
##########
@@ -1318,14 +1317,20 @@ class KafkaApis(val requestChannel: RequestChannel,
trace("Sending topic metadata %s and brokers %s for correlation id %d to
client %s".format(completeTopicMetadata.mkString(","),
brokers.mkString(","), request.header.correlationId,
request.header.clientId))
+ val controllerId = {
+ metadataCache.getControllerId.flatMap {
+ case ZkCachedControllerId(id) => Some(id)
+ case KRaftCachedControllerId(_) => metadataCache.getRandomAliveBrokerId
Review Comment:
I did something like this before. But got a different comment then, saying
we should explicitly handle that in KafkaApis.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]