jsancio commented on code in PR #20422:
URL: https://github.com/apache/kafka/pull/20422#discussion_r2333615167
##########
metadata/src/main/java/org/apache/kafka/controller/metrics/QuorumControllerMetrics.java:
##########
@@ -17,7 +17,9 @@
package org.apache.kafka.controller.metrics;
+import org.apache.kafka.common.metrics.MetricConfig;
import org.apache.kafka.common.utils.Time;
+import org.apache.kafka.raft.internals.TimeRatio;
Review Comment:
Other modules should not import from KRaft's internal types. The best option
is to move the TimeRatio type to server-common.
##########
metadata/src/main/java/org/apache/kafka/controller/QuorumController.java:
##########
@@ -532,6 +532,7 @@ private void handleEventEnd(String name, long
startProcessingTimeNs) {
MICROSECONDS.convert(deltaNs, NANOSECONDS));
performanceMonitor.observeEvent(name, deltaNs);
controllerMetrics.updateEventQueueProcessingTime(NANOSECONDS.toMillis(deltaNs));
+ controllerMetrics.updateIdleStartTime();
Review Comment:
Why did you decide to implement this metric updates in the QuorumController
instead of the KafkaEventQueue? At a high-level this metric measures how long
the thread(s) spends blocking for work. This is also the amount of time
KafkaEventQueue waits in the Condition variable in the handleEvents method.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]