chia7712 commented on code in PR #16302:
URL: https://github.com/apache/kafka/pull/16302#discussion_r1636170333


##########
core/src/main/scala/kafka/server/DynamicConfig.scala:
##########
@@ -30,10 +32,16 @@ import scala.jdk.CollectionConverters._
   * and can only be set dynamically.
   */
 object DynamicConfig {
+    object Broker {
+      private val brokerConfigs = {
+        val configs = QuotaConfigs.brokerQuotaConfigs()
+        KafkaConfig.configKeys
+          .filter { case (configName, _) => 
AllDynamicConfigs.contains(configName) }
+          .foreach { case (_, config) => configs.define(config) }
+        configs
+      }
 
-  object Broker {
-    private val brokerConfigs = QuotaConfigs.brokerQuotaConfigs()
-    DynamicBrokerConfig.addDynamicConfigs(brokerConfigs)
+      val nonDynamicProps: Set[String] = KafkaConfig.configNames.toSet -- 
brokerConfigs.names.asScala

Review Comment:
   Does it have correct indentation?



##########
core/src/main/scala/kafka/server/DynamicConfig.scala:
##########
@@ -30,10 +32,16 @@ import scala.jdk.CollectionConverters._
   * and can only be set dynamically.
   */
 object DynamicConfig {
+    object Broker {
+      private val brokerConfigs = {
+        val configs = QuotaConfigs.brokerQuotaConfigs()
+        KafkaConfig.configKeys
+          .filter { case (configName, _) => 
AllDynamicConfigs.contains(configName) }

Review Comment:
   Could you please add comments to remind readers about the circular reference?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to