apalan60 commented on code in PR #19888:
URL: https://github.com/apache/kafka/pull/19888#discussion_r2127793462


##########
metadata/src/main/java/org/apache/kafka/controller/metrics/ControllerMetadataMetrics.java:
##########
@@ -228,17 +228,17 @@ public void setBrokerRegistrationState(int brokerId, 
BrokerRegistration brokerRe
         }
         BrokerRegistrationState brokerState = 
getBrokerRegistrationState(brokerRegistration);
         if (brokerRegistrationStates.containsKey(brokerId)) {
-            brokerRegistrationStates.get(brokerId).set(brokerState.state());
+            brokerRegistrationStates.computeIfPresent(brokerId, (id, state) -> 
brokerState.state());

Review Comment:
   I've updated it. 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