You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2020/06/30 13:00:26 UTC

[GitHub] [kafka] omkreddy commented on a change in pull request #8935: KAFKA-10189: reset event queue time histogram when queue is empty

omkreddy commented on a change in pull request #8935:
URL: https://github.com/apache/kafka/pull/8935#discussion_r447662323



##########
File path: core/src/main/scala/kafka/controller/ControllerEventManager.scala
##########
@@ -69,14 +69,16 @@ class QueuedEvent(val event: ControllerEvent,
 class ControllerEventManager(controllerId: Int,
                              processor: ControllerEventProcessor,
                              time: Time,
-                             rateAndTimeMetrics: Map[ControllerState, KafkaTimer]) extends KafkaMetricsGroup {
+                             rateAndTimeMetrics: Map[ControllerState, KafkaTimer],
+                             eventQueueTimeTimeoutMs: Long = 60000) extends KafkaMetricsGroup {
   import ControllerEventManager._
 
   @volatile private var _state: ControllerState = ControllerState.Idle
   private val putLock = new ReentrantLock()
   private val queue = new LinkedBlockingQueue[QueuedEvent]
   // Visible for test
   private[controller] val thread = new ControllerEventThread(ControllerEventThreadName)
+  val eventQueueTimeMetricTimeoutMs = eventQueueTimeTimeoutMs

Review comment:
       We dont need new `eventQueueTimeMetricTimeoutMs` variable. we can use `eventQueueTimeTimeoutMs` directly ?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org