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

Reset metric EventQueueTimeMs

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.7.0
    • Component/s: controller, core, metrics
    • Labels:
      None

      Description

      The metric EventQueueTimeMs does not reset and therefore misrepresents the controller event queue time in these two scenarios:
      1. upon losing leader election - `EventQueueTimeMs` portrays the last event queue time of the previous controller and not the current controller
      2. no controller events are added to the queue - `EventQueueTimeMs` portrays the most recent event queue time, not the current queue time (which is 0)

      For both cases, we should reset the controller event queue time to 0.

      Implementation:

      Instead of using `LinkedBlockingQueue.take()` here, we can use `LinkedBlockingQueue.poll(long timeout, TimeUnit unit)` and reset `EventQueueTimeMs` if the queue is empty.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jeffkbkim Jeff Kim
                Reporter:
                jeffkbkim Jeff Kim
                Reviewer:
                Jose Armando Garcia Sancio
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: