aliehsaeedii commented on code in PR #20325:
URL: https://github.com/apache/kafka/pull/20325#discussion_r2273386686


##########
core/src/main/scala/kafka/server/AutoTopicCreationManager.scala:
##########
@@ -263,4 +318,30 @@ class DefaultAutoTopicCreationManager(
 
     (creatableTopics, uncreatableTopics)
   }
+
+  private def cacheTopicCreationErrors(topicNames: Set[String], errorMessage: 
String): Unit = {
+    topicNames.foreach { topicName =>
+      topicCreationErrorCache.put(topicName, 
CachedTopicCreationError(errorMessage, time))
+    }
+  }
+
+  private def cacheTopicCreationErrorsFromResponse(response: 
CreateTopicsResponse): Unit = {
+    response.data().topics().forEach { topicResult =>
+      if (topicResult.errorCode() != Errors.NONE.code()) {
+        val errorMessage = Option(topicResult.errorMessage())
+          .filter(_.nonEmpty)
+          .getOrElse(Errors.forCode(topicResult.errorCode()).message())
+        topicCreationErrorCache.put(
+          topicResult.name(),
+          CachedTopicCreationError(errorMessage, time)
+        )
+        debug(s"Cached topic creation error for ${topicResult.name()}: 
$errorMessage")
+      }
+      

Review Comment:
   Any log message here? `topic creates successfully...`



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