You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "apalan60 (via GitHub)" <gi...@apache.org> on 2025/06/05 01:49:43 UTC
Re: [PR] MINOR: Refactor brokerContactTimesMs and brokerRegistrationStates to use Long and Integer [kafka]
apalan60 commented on code in PR #19888:
URL: https://github.com/apache/kafka/pull/19888#discussion_r2127789049
##########
metadata/src/main/java/org/apache/kafka/controller/metrics/QuorumControllerMetrics.java:
##########
@@ -267,16 +267,15 @@ public long newActiveControllers() {
}
public void updateBrokerContactTime(int brokerId) {
- AtomicLong contactTime = brokerContactTimesMs.computeIfAbsent(brokerId, k -> new AtomicLong());
- contactTime.set(time.milliseconds());
+ brokerContactTimesMs.compute(brokerId, (id, timeMs) -> time.milliseconds());
Review Comment:
Thanks for your review. Updated!
--
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-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org