chia7712 commented on a change in pull request #8717:
URL: https://github.com/apache/kafka/pull/8717#discussion_r429552092



##########
File path: core/src/main/scala/kafka/server/AdminManager.scala
##########
@@ -454,6 +454,9 @@ class AdminManager(val config: KafkaConfig,
   private def alterTopicConfigs(resource: ConfigResource, validateOnly: 
Boolean,
                                 configProps: Properties, configEntriesMap: 
Map[String, String]): (ConfigResource, ApiError) = {
     val topic = resource.name
+    if (!metadataCache.contains(topic))
+      throw new UnknownTopicOrPartitionException(s"The topic '$topic' does not 
exist.")
+
     adminZkClient.validateTopicConfig(topic, configProps)

Review comment:
       hmmm, the following ```changeTopicConfig``` checks the topic name and 
configs again.  Not sure why there are such duplicate checks.




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


Reply via email to