ijuma commented on code in PR #18635: URL: https://github.com/apache/kafka/pull/18635#discussion_r1922987533
########## core/src/main/scala/kafka/server/metadata/KRaftMetadataCache.scala: ########## @@ -433,7 +433,7 @@ class KRaftMetadataCache( val image = _currentImage val result = new mutable.HashMap[Int, Node]() Option(image.topics().getTopic(tp.topic())).foreach { topic => - topic.partitions().values().forEach { partition => + Option(topic.partitions().get(tp.partition())).foreach { partition => Review Comment: Ouch - this is a painful oversight. -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org