mjsax commented on code in PR #20325: URL: https://github.com/apache/kafka/pull/20325#discussion_r2275159146
########## core/src/main/scala/kafka/server/KafkaApis.scala: ########## @@ -2889,6 +2889,24 @@ class KafkaApis(val requestChannel: RequestChannel, } } else { autoTopicCreationManager.createStreamsInternalTopics(topicsToCreate, requestContext); + + // Check for cached topic creation errors only if there's already a MISSING_INTERNAL_TOPICS status + val hasMissingInternalTopicsStatus = responseData.status() != null && + responseData.status().stream().anyMatch(s => s.statusCode() == StreamsGroupHeartbeatResponse.Status.MISSING_INTERNAL_TOPICS.code()) Review Comment: > If it's not missing then there is no error? Yes, maybe, but it seems the check is redundant? If there is any error in the cache, we know the topic is missing and we report the error. If the cache is empty, there is nothing to be reported (but we don't need to check the error code to find out that the cache is empty, we just look at the cache)? Of course, if a retry to create a topic is successful, we need to clear any previous error for this topic from the cache to not incorrectly report an older error. -- 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