stevenschlansker opened a new pull request, #18771: URL: https://github.com/apache/kafka/pull/18771
I opened KAFKA-18689 because we see in our application: ``` 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:398) at org.apache.kafka.streams.state.internals.MeteredKeyValueStore.lambda$registerMetrics$5(MeteredKeyValueStore.java:176) at org.apache.kafka.common.metrics.KafkaMetric.metricValue(KafkaMetric.java:81) at com.paywholesail.service.search.core.streams.KafkaStreamsMetricsManager$1.getValue(KafkaStreamsMetricsManager.java:53) at io.dropwizard.metrics5.graphite.GraphiteReporter.reportGauge(GraphiteReporter.java:480) at io.dropwizard.metrics5.graphite.GraphiteReporter.report(GraphiteReporter.java:378) ``` When looking at the code to fix it though, it seems there is already a fix applied. So no action is strictly necessary. However, I think the previous fix can be improved - instead of allowing the race to happen and catch the thrown exception, if we just use an iterator instead, we should get a (weakly) consistent view of the set despite concurrent modification. -- 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