chia7712 commented on code in PR #19828:
URL: https://github.com/apache/kafka/pull/19828#discussion_r2113475427


##########
metadata/src/main/java/org/apache/kafka/controller/metrics/QuorumControllerMetrics.java:
##########
@@ -267,7 +267,8 @@ public long newActiveControllers() {
     }
 
     public void updateBrokerContactTime(int brokerId) {
-        brokerContactTimesMs.putIfAbsent(brokerId, new 
AtomicLong(time.milliseconds()));

Review Comment:
   Excuse me, I don't understand the point of using `AtomicLong`. I check the 
usage of `brokerContactTimesMs` and it seems `ConcurrentHashMap<Integer, Long>` 
would be sufficient, right?



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