showuon commented on code in PR #16284:
URL: https://github.com/apache/kafka/pull/16284#discussion_r1636430852


##########
metadata/src/main/java/org/apache/kafka/controller/PartitionChangeBuilder.java:
##########
@@ -286,6 +290,8 @@ private ElectionResult electAnyLeader() {
                 .filter(replica -> isAcceptableLeader.test(replica))
                 .findFirst();
             if (uncleanLeader.isPresent()) {
+                // update "UncleanLeaderElectionsPerSec" metric
+                
metrics.ifPresent(QuorumControllerMetrics::updateUncleanLeaderElection);

Review Comment:
   Good suggestion. Changed to `ControllerMetadataMetrics` in this commit: 
https://github.com/apache/kafka/pull/16284/commits/12edf2ee2f9ed92f4c4e1177bd1092a2967bf005
 . I confirmed now all controllers will show this metric. Thanks.



-- 
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: jira-unsubscr...@kafka.apache.org

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

Reply via email to