kevin-wu24 commented on code in PR #18304:
URL: https://github.com/apache/kafka/pull/18304#discussion_r1901124071
##########
raft/src/main/java/org/apache/kafka/raft/KafkaRaftClient.java:
##########
@@ -3515,6 +3519,14 @@ public Optional<Node> voterNode(int id, ListenerName
listenerName) {
return partitionState.lastVoterSet().voterNode(id, listenerName);
}
+ public int ignoredStaticVoters() {
Review Comment:
I agree that once this metric reports true it will continue to report as
such, so repeatedly calling this function is redundant.
However, I'm not sure how to implement this without adding some kind of
public method in `KafkaRaftClient` so that `BrokerServerMetrics` and
`ControllerMetdataMetrics` can access this information. If we decide to store
this in the `KafkaRaftMetrics` object and update in
`KRaftControlRecordStateMachine#handleBatch`, we would still need a public
method in `KafkaRaftClient` to make the `KafkaRaftMetrics` object visible to
those aforementioned metrics objects. Maybe this metric should be at the
`KafkaRaftMetrics` level instead.
--
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]