You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2018/09/20 05:59:18 UTC

[GitHub] sijie commented on a change in pull request #2618: Guard against NaN for double type metrics

sijie commented on a change in pull request #2618: Guard against NaN for double type metrics
URL: https://github.com/apache/incubator-pulsar/pull/2618#discussion_r219041640
 
 

 ##########
 File path: pulsar-common/src/main/java/org/apache/pulsar/policies/data/loadbalancer/LoadReport.java
 ##########
 @@ -285,31 +285,47 @@ public double getAllocatedCPU() {
     }
 
     public void setAllocatedCPU(double allocatedCPU) {
-        this.allocatedCPU = allocatedCPU;
+        if (Double.isFinite(allocatedCPU)) {
 
 Review comment:
   make a util function for that.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services