jsancio commented on code in PR #21005:
URL: https://github.com/apache/kafka/pull/21005#discussion_r2800306684


##########
core/src/main/scala/kafka/server/ConfigAdminManager.scala:
##########
@@ -112,48 +112,33 @@ class ConfigAdminManager(nodeId: Int,
     })
     request.resources().forEach(resource => {
       if (!results.containsKey(resource)) {
-        val resourceType = ConfigResource.Type.forId(resource.resourceType())
-        val configResource = new ConfigResource(resourceType, 
resource.resourceName())
-        try {
-          if (containsDuplicates(resource.configs().asScala.map(_.name()))) {
-            throw new InvalidRequestException("Error due to duplicate config 
keys")
-          }
-          val nullUpdates = new util.ArrayList[String]()
-          resource.configs().forEach { config =>
-            if (config.configOperation() != AlterConfigOp.OpType.DELETE.id() &&
-              config.value() == null) {
-              nullUpdates.add(config.name())
+        processConfigResource(

Review Comment:
   @junrao and I discussed this offline.
   
   The basic issue is that only the broker has enough information to validate 
some dynamic configuration changes. Consider the `DynamicListenerConfig` which 
implements `BrokerReconfigurable`. If the user attempts to change the listeners 
and security groups, that needs to get validated against the existing dynamic 
configuration and static configuration from the broker's local properties file. 
The full validation can only be performed by the broker.



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