You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "dino2895 (Jira)" <ji...@apache.org> on 2026/07/10 20:52:00 UTC
[jira] [Assigned] (KAFKA-20796) num-open-iterators metric under-counts iterators from MeteredTimestampedKeyValueStore
[ https://issues.apache.org/jira/browse/KAFKA-20796?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
dino2895 reassigned KAFKA-20796:
--------------------------------
Assignee: dino2895
> 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
> Assignee: dino2895
> Priority: Major
>
> 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)