showuon commented on a change in pull request #8712:
URL: https://github.com/apache/kafka/pull/8712#discussion_r444741037
##########
File path:
streams/src/main/java/org/apache/kafka/streams/processor/internals/InternalTopicManager.java
##########
@@ -242,11 +256,16 @@ public InternalTopicManager(final Admin adminClient,
final StreamsConfig streams
log.error(errorMsg);
throw new StreamsException(errorMsg);
}
- } else {
+ } else if (!leaderNotAvailableTopics.contains(topicName)) {
topicsToCreate.add(topicName);
}
}
return topicsToCreate;
}
+
+ private boolean shouldRetry(final Set<String> topicsNotReady, final
HashSet<String> leaderNotAvailableTopics) {
+ // If there's topic with LeaderNotAvailableException, we still need
retry
+ return !topicsNotReady.isEmpty() || leaderNotAvailableTopics.size() >
0;
Review comment:
Good suggestion. Updated.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]