ahuang98 commented on code in PR #21053:
URL: https://github.com/apache/kafka/pull/21053#discussion_r2677190160


##########
core/src/main/scala/kafka/server/KafkaRaftServer.scala:
##########
@@ -87,8 +90,22 @@ class KafkaRaftServer(
     None
   }
 
+  def getAllDynamicConfigNames: util.Set[String] = {
+    val topicConfigs = LogConfig.nonInternalConfigNames.asScala.toSet
+    val brokerConfigs = DynamicConfig.Broker.names.asScala.toSet
+    val userConfigs = 
QuotaConfig.scramMechanismsPlusUserAndClientQuotaConfigs().names.asScala.toSet
+    val clientConfigs = 
QuotaConfig.userAndClientQuotaConfigs().names.asScala.toSet
+    val ipConfigs = QuotaConfig.ipConfigs.names.asScala.toSet
+    val clientMetricsConfigs = 
ClientMetricsConfigs.configDef().names.asScala.toSet
+    val groupConfigs = GroupConfig.configDef().names.asScala.toSet
+
+    (topicConfigs ++ brokerConfigs ++ userConfigs ++ clientConfigs ++ 
ipConfigs ++ clientMetricsConfigs ++ groupConfigs).asJava
+  }
+
   override def startup(): Unit = {
     Mx4jLoader.maybeLoad()
+    // Initialize the whitelist for ConfigurationDelta to filter 
deprecated/invalid configs
+    ConfigurationDelta.initializeValidConfigs(getAllDynamicConfigNames)

Review Comment:
   MetadataLoader is built in SharedServer, I'm wondering if it will be better 
practice to generate the set of dynamicConfigNames in sharedServer and then 
pass it all the way through form MetadataLoader to MetadataDelta to 
ConfigurationsDelta etc.



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