lbradstreet commented on a change in pull request #10704: URL: https://github.com/apache/kafka/pull/10704#discussion_r633028316
########## File path: clients/src/main/java/org/apache/kafka/common/config/AbstractConfig.java ########## @@ -106,7 +107,7 @@ public AbstractConfig(ConfigDef definition, Map<?, ?> originals, Map<String, ?> this.originals = resolveConfigVariables(configProviderProps, (Map<String, Object>) originals); this.values = definition.parse(this.originals); - this.used = Collections.synchronizedSet(new HashSet<>()); + this.used = new CopyOnWriteArraySet<>(); Review comment: Yeah, I normally don't like them very much either but I thought the number of operations on it would be small and it'd be OK. Given that this used map is updated on every use, maybe that assumption could end up being wrong in some use of AbstractConfig. I'll switch it to ConcurrentHashSet. -- 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