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


##########
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:
   Oh, I see, didn't know that there is no top level error. I think that would 
be the ideal solution, but not sure if we need to stick to that.
   What if we used UNKNOWN_TOPIC on the topic level instead? That one is 
already part of the API, and clients are aware of it, too.



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