jiajunwang commented on a change in pull request #639: Refine the WAGED 
rebalancer to minimize the partial rebalance workload.
URL: https://github.com/apache/helix/pull/639#discussion_r359188439
 
 

 ##########
 File path: 
helix-core/src/main/java/org/apache/helix/controller/rebalancer/waged/WagedRebalancer.java
 ##########
 @@ -295,7 +296,7 @@ public void close() {
   // Coordinate baseline recalculation and partial rebalance according to the 
cluster changes.
 
 Review comment:
   Yes, we can. But the code would be a little bit awkward. Note there is a 
try-catch block. If we use the returned map directly, I need to set the to be 
null. Then if the wagedrebalance calculation fails, I set it with an empty map 
within the catch block. So the following non-waged rebalance logic can keep 
adding to that map.
   I feel it would be reader unfriendly and potentially harder to maintain.

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to