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_r359105202
##########
File path:
helix-core/src/main/java/org/apache/helix/controller/rebalancer/waged/WagedRebalancer.java
##########
@@ -306,14 +307,15 @@ public void close() {
delayedRebalanceSchedule(clusterData, activeNodes, resourceMap.keySet());
Review comment:
I might miss something, but even that's the case, we still need to pass it
as a parameter to computeBestPossibleAssignment and applyRebalanceOverwrite to
avoid race condition, right? So it just reduces one layer. The cost is that we
need to re-create a algorithm on every rebalance.
Another option is refer to the private fields multiple times in this method.
And this is also safe for now. But considering the future change, it is safer
to call this at just one place.
It is a good practice to reduce refer to a mutable field in the method, you
know.
----------------------------------------------------------------
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]