rmdmattingly opened a new pull request, #6641:
URL: https://github.com/apache/hbase/pull/6641

   The sumMultiplier field is used in the needsBalance method, but it is not 
initialized until calling balanceTable. This is silly and can cause weird 
behavior on an HMaster's initial balancer run, because the statement:
   ```java
   boolean balanced = (total / sumMultiplier < minCostNeedBalance);
   ```
   will always result to false, given that `total / sumMultiplier` == NaN, so 
it is not comparable to the min balance cost.
   
   This isn't a huge issue, but I noticed this in my recent work on the 
balancer and it's worth fixing imo.
   
   The needsBalance method already iterates through all cost functions ahead of 
using the sumMultiplier field, so we might as well just ensure that we've 
updated the sumMultiplier field here as well.


-- 
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: [email protected]

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

Reply via email to