-
Notifications
You must be signed in to change notification settings - Fork 14.7k
KAFKA-19467: Add a metric for controller thread idleness #20422
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MahsaSeifikar: Please apply spotless
3ba707f
to
fd49893
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the changes @MahsaSeifikar. I have a question about the wrapper classes being introduced:
metadata/src/main/java/org/apache/kafka/controller/metrics/QuorumControllerMetrics.java
Outdated
Show resolved
Hide resolved
fd49893
to
9294f46
Compare
metadata/src/main/java/org/apache/kafka/controller/QuorumController.java
Show resolved
Hide resolved
8fa1734
to
9115bdc
Compare
metadata/src/main/java/org/apache/kafka/controller/QuorumController.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the updates @MahsaSeifikar
Two more comments:
metadata/src/main/java/org/apache/kafka/controller/metrics/QuorumControllerMetrics.java
Outdated
Show resolved
Hide resolved
metadata/src/main/java/org/apache/kafka/controller/metrics/QuorumControllerMetrics.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes LGTM @MahsaSeifikar.
@chia7712 Could you please review this metric KIP when you get a chance? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what do you think about moving updateIdleStartTime
into updateEventQueueProcessingTime
? you would need to call it in one other place outside of that.
otherwise looks reasonable to me, thanks Mahsa!
metadata/src/main/java/org/apache/kafka/controller/QuorumController.java
Outdated
Show resolved
Hide resolved
metadata/src/main/java/org/apache/kafka/controller/QuorumController.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the change @MahsaSeifikar . I left some high-level comments and observations.
metadata/src/main/java/org/apache/kafka/controller/metrics/QuorumControllerMetrics.java
Outdated
Show resolved
Hide resolved
metadata/src/main/java/org/apache/kafka/controller/QuorumController.java
Outdated
Show resolved
Hide resolved
95a4c32
to
715a151
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the changes @MahsaSeifikar
server-common/src/main/java/org/apache/kafka/queue/KafkaEventQueue.java
Outdated
Show resolved
Hide resolved
server-common/src/main/java/org/apache/kafka/queue/KafkaEventQueue.java
Outdated
Show resolved
Hide resolved
server-common/src/main/java/org/apache/kafka/queue/KafkaEventQueue.java
Outdated
Show resolved
Hide resolved
server-common/src/main/java/org/apache/kafka/queue/KafkaEventQueue.java
Outdated
Show resolved
Hide resolved
metadata/src/main/java/org/apache/kafka/controller/QuorumController.java
Outdated
Show resolved
Hide resolved
server-common/src/main/java/org/apache/kafka/queue/KafkaEventQueue.java
Outdated
Show resolved
Hide resolved
metadata/src/main/java/org/apache/kafka/controller/metrics/QuorumControllerMetrics.java
Outdated
Show resolved
Hide resolved
server-common/src/main/java/org/apache/kafka/queue/KafkaEventQueue.java
Outdated
Show resolved
Hide resolved
e63cc81
to
ae63e16
Compare
ae63e16
to
c9a4c87
Compare
metadata/src/main/java/org/apache/kafka/controller/QuorumController.java
Show resolved
Hide resolved
metadata/src/main/java/org/apache/kafka/controller/metrics/QuorumControllerMetrics.java
Outdated
Show resolved
Hide resolved
This Here is the ticket KAFKA-19513 to fix this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
metadata/src/main/java/org/apache/kafka/controller/metrics/QuorumControllerMetrics.java
Show resolved
Hide resolved
metadata/src/main/java/org/apache/kafka/controller/metrics/QuorumControllerMetrics.java
Outdated
Show resolved
Hide resolved
server-common/src/main/java/org/apache/kafka/queue/KafkaEventQueue.java
Outdated
Show resolved
Hide resolved
metadata/src/test/java/org/apache/kafka/controller/metrics/QuorumControllerMetricsTest.java
Outdated
Show resolved
Hide resolved
metadata/src/test/java/org/apache/kafka/controller/metrics/QuorumControllerMetricsTest.java
Show resolved
Hide resolved
server-common/src/test/java/org/apache/kafka/queue/KafkaEventQueueTest.java
Outdated
Show resolved
Hide resolved
server-common/src/test/java/org/apache/kafka/queue/KafkaEventQueueTest.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Test failures seem unrelated to this change:
|
This change adds the metric ControllerEventManager::AvgIdleRatio which
measures the amount of time the controller spends blocked waiting for
events vs the amount of time spent processing events. A value of 1.0
means that the controller spent the entire interval blocked waiting for
events.
Reviewers: José Armando García Sancio [email protected], Kevin Wu
[email protected], Alyssa Huang [email protected], TengYao
Chi [email protected], Reviewers: Chia-Ping Tsai
[email protected]