lhotari commented on a change in pull request #9393:
URL: https://github.com/apache/pulsar/pull/9393#discussion_r573545104



##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/GenericBrokerHostUsageImpl.java
##########
@@ -62,8 +67,10 @@ public SystemResourceUsage getBrokerHostUsage() {
     }
 
     private void checkCpuLoad() {
-        cpuUsageSum += systemBean.getSystemCpuLoad();
-        cpuUsageCount++;
+        synchronized (this) {

Review comment:
       @michaeljmarshall if you happen to make further changes, it would be 
useful to rebase the PR on latest master branch changes. Good work! Thank you




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to