chia7712 commented on code in PR #20060: URL: https://github.com/apache/kafka/pull/20060#discussion_r2173480231
########## 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: I was worried for adding the same `iterator`, which could create unexpected metrics, but it seems `StateStoreMetrics.addOldestOpenIteratorGauge` already handle this case. -- 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