Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-12272

Kafka Streams metric commit-latency-max and commit-latency-avg is always 0

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • 2.7.0, 2.6.1
    • 2.8.0, 2.7.1, 2.6.2
    • streams
    • None

    Description

      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:

      With Kafka Streams 2.7.0:

      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

      Attachments

        1. KS-2.6.0.png
          62 kB
          Damien Gasparina
        2. KS-2.7.0.png
          63 kB
          Damien Gasparina

        Issue Links

          Activity

            People

              mjsax Matthias J. Sax
              Dabz Damien Gasparina
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: