You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "k-apol (via GitHub)" <gi...@apache.org> on 2025/12/06 16:31:12 UTC

Re: [PR] KAFKA-10357: Refactor makeReady to reduce complexity and support upcoming KIP-698 changes [kafka]

k-apol commented on code in PR #20326:
URL: https://github.com/apache/kafka/pull/20326#discussion_r2595096018


##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/InternalTopicManager.java:
##########
@@ -421,9 +426,11 @@ public Map<String, List<TopicPartitionInfo>> getTopicPartitionInfo(final Set<Str
         final Map<String, List<TopicPartitionInfo>> topicPartitionInfo = new HashMap<>();
 
         while (!topicsToDescribe.isEmpty()) {
-            final Map<String, List<TopicPartitionInfo>> existed = getTopicPartitionInfo(topicsToDescribe, null);
+            final Set<String> tempUnknownTopics = new HashSet<>();
+            final Map<String, List<TopicPartitionInfo>> existed = getTopicPartitionInfo(topicsToDescribe, tempUnknownTopics);
             topicPartitionInfo.putAll(existed);
             topicsToDescribe.removeAll(topicPartitionInfo.keySet());
+            topicsToDescribe.addAll(tempUnknownTopics); // keep retrying unknown ones

Review Comment:
   My thinking here was that a transient error could potentially mask topics that would not be ready in this scenario.. looking at it now, it is excessive, as a network call to the broker would have succeeded at this point. I will remove it as I am not confident in this change myself now



-- 
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-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org