kamalcph commented on code in PR #16693:
URL: https://github.com/apache/kafka/pull/16693#discussion_r1693006676


##########
metadata/src/main/java/org/apache/kafka/controller/ConfigurationControlManager.java:
##########
@@ -269,12 +269,12 @@ private ApiError validateAlterConfig(ConfigResource 
configResource,
                                          List<ApiMessageAndVersion> 
recordsImplicitlyDeleted,
                                          boolean newlyCreatedResource) {
         Map<String, String> allConfigs = new HashMap<>();
-        Map<String, String> existingConfigsInMap = new HashMap<>();
+        Map<String, String> existingConfigsMap = new HashMap<>();
         Map<String, String> alteredConfigsForAlterConfigPolicyCheck = new 
HashMap<>();
-        TimelineHashMap<String, String> existingConfigs = 
configData.get(configResource);
-        if (existingConfigs != null) {
-            existingConfigsInMap.putAll(existingConfigs);
-            allConfigs.putAll(existingConfigs);
+        TimelineHashMap<String, String> existingConfigsSnapshot = 
configData.get(configResource);

Review Comment:
   for my understanding, why do we need `existingConfigsMap` and not using the 
`existingConfigsSnapshot` directly?



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