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_r357425069
##########
File path:
helix-core/src/main/java/org/apache/helix/controller/rebalancer/waged/WagedRebalancer.java
##########
@@ -296,7 +297,7 @@ public void close() {
// Coordinate baseline recalculation and partial rebalance according to the
cluster changes.
private Map<String, IdealState> computeBestPossibleStates(
ResourceControllerDataProvider clusterData, Map<String, Resource>
resourceMap,
- final CurrentStateOutput currentStateOutput)
+ final CurrentStateOutput currentStateOutput, RebalanceAlgorithm
algorithm)
Review comment:
Sorry that I didn't notice that you cannot reopen the conversation...
Actually, the main reason for this is not preventing a simple race
condition, but to prevent the different pipelines (baseline and partial
rebalance) or different steps get different algorithm objects.
A small lock surrounding the get method won't help. Because we have more
than one get in the whole workflow. Given that saying, the second method won't
work as well. Whenever the algorithm object is updated, it will be visible to
the next get call. And that is not what we want.
----------------------------------------------------------------
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]