You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/03/23 17:31:43 UTC

[GitHub] [kafka] abbccdda commented on a change in pull request #10142: KAFKA-12294: forward auto topic request within envelope on behalf of clients

abbccdda commented on a change in pull request #10142:
URL: https://github.com/apache/kafka/pull/10142#discussion_r599787253



##########
File path: core/src/main/scala/kafka/server/AutoTopicCreationManager.scala
##########
@@ -166,7 +179,34 @@ class DefaultAutoTopicCreationManager(
         debug(s"Auto topic creation completed for ${creatableTopics.keys}.")
         clearInflightRequests(creatableTopics)
       }
-    })
+    }
+
+    val channelManager = this.channelManager.getOrElse {
+      throw new IllegalStateException("Channel manager must be defined in order to send CreateTopic requests.")
+    }
+
+    metadataRequestContext match {
+      case Some(context) =>
+        val requestVersion =
+          channelManager.controllerApiVersions() match {
+            case None =>
+              ApiKeys.CREATE_TOPICS.latestVersion()

Review comment:
       I guess we could rely on client to retry Metadata request for simplicity.




-- 
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:
users@infra.apache.org