[ 
https://issues.apache.org/jira/browse/KAFKA-19679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18019284#comment-18019284
 ] 

Matthias J. Sax commented on KAFKA-19679:
-----------------------------------------

[~stevenschlansker] – Can you test the fix and verify if it does work as 
expected, and let us know?

> NoSuchElementException (again) in Kafka Streams iterator metrics
> ----------------------------------------------------------------
>
>                 Key: KAFKA-19679
>                 URL: https://issues.apache.org/jira/browse/KAFKA-19679
>             Project: Kafka
>          Issue Type: Bug
>          Components: streams
>    Affects Versions: 4.1.0
>            Reporter: Steven Schlansker
>            Assignee: Nikita Shupletsov
>            Priority: Minor
>             Fix For: 4.2.0, 4.1.1
>
>
> Since upgrading to Kafka 4.1.0, we again see in our metrics collection:
> {code:java}
> Exception thrown from GraphiteReporter#report. Exception was suppressed.
> java.util.NoSuchElementException: null
>       at 
> java.base/java.util.concurrent.ConcurrentSkipListMap.firstKey(ConcurrentSkipListMap.java:1863)
>       at 
> java.base/java.util.concurrent.ConcurrentSkipListSet.first(ConcurrentSkipListSet.java:393)
>       at 
> org.apache.kafka.streams.internals.metrics.OpenIterators.lambda$add$0(OpenIterators.java:57)
>       at 
> org.apache.kafka.common.metrics.KafkaMetric.metricValue(KafkaMetric.java:81) 
> {code}
> I think unfortunately the dynamic registration introduced in KAFKA-19398 
> ([https://github.com/apache/kafka/pull/20022]) might have reverted the fix 
> from [https://github.com/apache/kafka/pull/18771]
> There is still a race between removing the metric gauge, and the last 
> iterator being removed from the tracking set.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to