hachikuji commented on a change in pull request #11448:
URL: https://github.com/apache/kafka/pull/11448#discussion_r745021117



##########
File path: core/src/main/scala/kafka/server/DynamicBrokerConfig.scala
##########
@@ -516,7 +516,15 @@ class DynamicBrokerConfig(private val kafkaConfig: 
KafkaConfig) extends Logging
     newProps ++= staticBrokerConfigs
     overrideProps(newProps, dynamicDefaultConfigs)
     overrideProps(newProps, dynamicBrokerConfigs)
-    val oldConfig = currentConfig
+
+    // We need a copy of the current config since `currentConfig` is 
initialized with `kafkaConfig`
+    // which means the call to `updateCurrentConfig` would end up mutating 
`oldConfig`.
+    val oldConfig = if (kafkaConfig eq currentConfig) {

Review comment:
       I pushed a patch which initializes `currentConfig` as null in order to 
make the call to `initialize` required. Let me know if that seems like a 
reasonable approach.




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