viktorsomogyi commented on code in PR #13975:
URL: https://github.com/apache/kafka/pull/13975#discussion_r1262674671


##########
core/src/main/scala/kafka/server/metadata/KRaftMetadataCache.scala:
##########
@@ -174,14 +174,25 @@ class KRaftMetadataCache(val brokerId: Int) extends 
MetadataCache with Logging w
                                 errorUnavailableEndpoints: Boolean = false,
                                 errorUnavailableListeners: Boolean = false): 
Seq[MetadataResponseTopic] = {
     val image = _currentImage
-    topics.toSeq.flatMap { topic =>
-      getPartitionMetadata(image, topic, listenerName, 
errorUnavailableEndpoints, errorUnavailableListeners).map { partitionMetadata =>
+    if (!isInitialized()) {
+      topics.toSeq.map(topic =>

Review Comment:
   Yea, so I transformed my solution a bit: I moved the logic over to 
`ZkAdminManager`, it is local to Zookeeper only.
   
   I left the interface change, it may prove useful for KRaft as well in the 
future.



-- 
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

Reply via email to