jsancio commented on code in PR #16006:
URL: https://github.com/apache/kafka/pull/16006#discussion_r1608902290
##########
core/src/main/scala/kafka/server/metadata/ZkMetadataCache.scala:
##########
@@ -350,11 +347,7 @@ class ZkMetadataCache(
override def getAliveBrokerNode(brokerId: Int, listenerName: ListenerName):
Option[Node] = {
val snapshot = metadataSnapshot
- brokerId match {
- case id if
snapshot.controllerId.filter(_.isInstanceOf[KRaftCachedControllerId]).exists(_.id
== id) =>
- kraftControllerNodeMap.get(id)
- case _ =>
snapshot.aliveBrokers.get(brokerId).flatMap(_.getNode(listenerName))
- }
+ snapshot.aliveBrokers.get(brokerId).flatMap(_.getNode(listenerName))
Review Comment:
Interesting. Do you know why this was added in the first place? @akhileshchg
--
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]