cmccabe commented on a change in pull request #10772:
URL: https://github.com/apache/kafka/pull/10772#discussion_r732036343



##########
File path: 
metadata/src/main/java/org/apache/kafka/controller/ClusterControlManager.java
##########
@@ -249,6 +256,10 @@ public void replay(RegisterBrokerRecord record) {
             features.put(feature.name(), new VersionRange(
                 feature.minSupportedVersion(), feature.maxSupportedVersion()));
         }
+       
+        if (record.fenced()) {
+            
controllerMetrics.setFencedBrokerCount(controllerMetrics.fencedBrokerCount() + 
1);

Review comment:
       We need to update this based on what the previous registration was, if 
any.
   
   It would be useful to have a helper function that took as an argument the 
previous registration (or null) and the new registration (or null), and updated 
the metrics accordingly.




-- 
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