You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Damien Gasparina (Jira)" <ji...@apache.org> on 2021/02/02 18:09:00 UTC

[jira] [Created] (KAFKA-12272) Kafka Streams metric commit-latency-max and commit-latency-avg is always 0

Damien Gasparina created KAFKA-12272:
----------------------------------------

             Summary: Kafka Streams metric commit-latency-max and commit-latency-avg is always 0
                 Key: KAFKA-12272
                 URL: https://issues.apache.org/jira/browse/KAFKA-12272
             Project: Kafka
          Issue Type: Bug
          Components: streams
    Affects Versions: 2.6.1, 2.7.0
            Reporter: Damien Gasparina
         Attachments: KS-2.6.0.png, KS-2.7.0.png

After upgrading to Kafka Streams 2.7.0, the JMX metrics commit-latency-max and commit-latency-avg is always equal to 0.


For the same application, with Kafka Streams 2.6.0 and bellow, I can observe:
 !KS-2.6.0.png! 


With Kafka Streams 2.7.0:
 !KS-2.7.0.png! 


By quickly looking at the issue, I got the feeling it's a drawback from: https://github.com/apache/kafka/pull/9634.

We are setting _now_ to the current Time in the _maybeCommit()_ function: https://github.com/apache/kafka/blob/2.7/streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamThread.java#L930. 

And just after we do a _Time.millisecond() - now_ (that we just updated) to compute the latency: https://github.com/apache/kafka/blob/2.7/streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamThread.java#L692



--
This message was sent by Atlassian Jira
(v8.3.4#803005)