RaidenE1 commented on code in PR #20325: URL: https://github.com/apache/kafka/pull/20325#discussion_r2270921287
########## core/src/main/scala/kafka/server/AutoTopicCreationManager.scala: ########## @@ -112,6 +128,45 @@ class DefaultAutoTopicCreationManager( } } + override def getTopicCreationErrors( + topicNames: Set[String] + ): Map[String, String] = { + val currentTime = System.currentTimeMillis() + val errors = mutable.Map.empty[String, String] + val expiredKeys = mutable.Set.empty[String] + + // Check requested topics and collect expired keys + topicNames.foreach { topicName => + Option(topicCreationErrorCache.get(topicName)) match { + case Some(cachedError) if (currentTime - cachedError.timestamp) <= errorCacheTtlMs => Review Comment: I think it makes sense -- 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