mjsax commented on code in PR #20060: URL: https://github.com/apache/kafka/pull/20060#discussion_r2178415078
########## streams/src/main/java/org/apache/kafka/streams/internals/metrics/OpenIterators.java: ########## @@ -50,24 +48,22 @@ public OpenIterators(final TaskId taskId, public void add(final MeteredIterator iterator) { openIterators.add(iterator); - numOpenIterators.increment(); - if (numOpenIterators.intValue() == 1) { + if (openIterators.size() == 1) { Review Comment: Well, would be a bug anyway, to call `openIterators.add(iterator);` twice on the same `iterator` object. Each iterator should be registered exactly one time. -- 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