chia7712 commented on a change in pull request #8826: URL: https://github.com/apache/kafka/pull/8826#discussion_r533093616
########## File path: clients/src/main/java/org/apache/kafka/common/config/AbstractConfig.java ########## @@ -105,7 +105,9 @@ public AbstractConfig(ConfigDef definition, Map<?, ?> originals, Map<String, ?> throw new ConfigException(entry.getKey().toString(), entry.getValue(), "Key must be a string."); this.originals = resolveConfigVariables(configProviderProps, (Map<String, Object>) originals); - this.values = definition.parse(this.originals); + // pass a copy to definition.parse. Otherwise, the definition.parse adds all keys of definitions to "used" group + // since definition.parse needs to call "RecordingMap#get" when checking all definitions. + this.values = definition.parse(new HashMap<>(this.originals)); Review comment: > But it seems this is still needed? It is not necessary with the latest change. I kept it as a total solution (if someone pass ```RecordingMap``` in the future). However, I'm going to remove it to make this PR simpler. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org