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 2020/09/17 17:54:26 UTC

[GitHub] [kafka] dongjinleekr commented on a change in pull request #9284: KAFKA-10479 Throw exception if users try to update configs of existen…

dongjinleekr commented on a change in pull request #9284:
URL: https://github.com/apache/kafka/pull/9284#discussion_r490449947



##########
File path: core/src/main/scala/kafka/server/DynamicBrokerConfig.scala
##########
@@ -910,6 +903,11 @@ class DynamicListenerConfig(server: KafkaServer) extends BrokerReconfigurable wi
     if (!newListeners.keySet.subsetOf(newConfig.listenerSecurityProtocolMap.keySet))
       throw new ConfigException(s"Listeners '$newListeners' must be subset of listener map '${newConfig.listenerSecurityProtocolMap}'")
     newListeners.keySet.intersect(oldListeners.keySet).foreach { listenerName =>
+      def immutableListenerConfigs(kafkaConfig: KafkaConfig, prefix: String): Map[String, AnyRef] = {
+        kafkaConfig.originals.asScala.filter { case (key, _) =>
+          key.startsWith(prefix) && !DynamicSecurityConfigs.contains(key)
+        }
+      }
       val prefix = listenerName.configPrefix
       val newListenerProps = immutableListenerConfigs(newConfig, prefix)

Review comment:
       Right, this line does not work correctly as of present.




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