jolshan commented on code in PR #15324: URL: https://github.com/apache/kafka/pull/15324#discussion_r1482140038
########## storage/src/main/java/org/apache/kafka/storage/internals/log/ProducerStateManager.java: ########## @@ -177,7 +177,7 @@ private void addProducerId(long producerId, ProducerStateEntry entry) { } private void removeProducerIds(List<Long> keys) { - producers.keySet().removeAll(keys); + keys.forEach(producers.keySet()::remove); Review Comment: I wonder if the issue is that we specify a list here and not a set. (If both collections are a set, I believe should we iterate through the smaller one as you do here) -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org