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

Reset metric EventQueueTimeMs

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 2.7.0
    • controller, core, metrics
    • 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

              jeffkbkim Jeff Kim
              jeffkbkim Jeff Kim
              José Armando García Sancio José Armando García Sancio
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: