aliehsaeedii commented on code in PR #20325:
URL: https://github.com/apache/kafka/pull/20325#discussion_r2273282296
##########
core/src/main/scala/kafka/server/AutoTopicCreationManager.scala:
##########
@@ -135,10 +190,17 @@ class DefaultAutoTopicCreationManager(
clearInflightRequests(creatableTopics)
if (response.authenticationException() != null) {
warn(s"Auto topic creation failed for ${creatableTopics.keys} with
authentication exception")
+ cacheTopicCreationErrors(creatableTopics.keys.toSet, "Authentication
failed")
} else if (response.versionMismatch() != null) {
warn(s"Auto topic creation failed for ${creatableTopics.keys} with
invalid version exception")
+ cacheTopicCreationErrors(creatableTopics.keys.toSet, "Version
mismatch")
} else {
- debug(s"Auto topic creation completed for ${creatableTopics.keys}
with response ${response.responseBody}.")
+ response.responseBody() match {
+ case createTopicsResponse: CreateTopicsResponse =>
+ cacheTopicCreationErrorsFromResponse(createTopicsResponse)
Review Comment:
I also think no need to add the success case to the error cache. Not
optimized + misleading code
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]