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

Fetch request metrics are updated twice for delayed fetches

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.5.0
    • Fix Version/s: 2.6.0
    • Component/s: None
    • Labels:
      None

      Description

      We track fetch request rate metrics in `BrokerTopicStats`. We have both topic level and total metrics. Currently these values are updated in `ReplicaManager.readFromLocalLog`. Inside `fetchMessages`, we invoke `readFromLocalLog` first to see if the fetch can be immediately satisfied. If not, then we put it in purgatory. After completing purgatory, we make a second call to `readFromLocalLog` which will again update the request rate metrics. Hence we are overcounting the fetch request rate.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                hachikuji Jason Gustafson
                Reporter:
                hachikuji Jason Gustafson
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: