You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Jess Jin (Jira)" <ji...@apache.org> on 2026/07/10 17:07:00 UTC
[jira] [Created] (KAFKA-20796) num-open-iterators metric under-counts iterators from MeteredTimestampedKeyValueStore
Jess Jin created KAFKA-20796:
--------------------------------
Summary: num-open-iterators metric under-counts iterators from MeteredTimestampedKeyValueStore
Key: KAFKA-20796
URL: https://issues.apache.org/jira/browse/KAFKA-20796
Project: Kafka
Issue Type: Improvement
Components: streams
Reporter: Jess Jin
MeteredTimestampedKeyValueStoreIterator(streams/src/main/java/org/apache/kafka/streams/state/internals/MeteredTimestampedKeyValueStore.java:301) registers itself in {{openIterators}} but never calls {{{}numOpenIterators.increment () / decrement(){}}}.
As a result, iterators opened against a plain (non-headers) timestamped key-value store are invisible to the '{{{}num-open-iterators{}}}' metric while still visible to '{{{}oldest-iterator-open-since-ms{}}}' - the two gauges disagree about how many iterators are open.
Fix: call {{numOpenIterators.increment()}} in the constructor and {{numOpenIterators.decrement()}} in {{close()}}.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)