narendly commented on a change in pull request #690: Reset the WAGED rebalancer
once the controller newly acquires leadership.
URL: https://github.com/apache/helix/pull/690#discussion_r370759211
##########
File path:
helix-core/src/main/java/org/apache/helix/controller/stages/BestPossibleStateCalcStage.java
##########
@@ -282,22 +263,22 @@ private boolean validateOfflineInstancesLimit(final
ResourceControllerDataProvid
Map<String, IdealState> newIdealStates = new HashMap<>();
- ClusterConfig clusterConfig = cache.getClusterConfig();
- WagedRebalancer wagedRebalancer =
- getWagedRebalancer(helixManager,
clusterConfig.getGlobalRebalancePreference(),
- clusterConfig.isGlobalRebalanceAsyncModeEnabled());
- try {
- newIdealStates.putAll(wagedRebalancer.computeNewIdealStates(cache,
wagedRebalancedResourceMap,
- currentStateOutput));
- } catch (HelixRebalanceException ex) {
- // Note that unlike the legacy rebalancer, the WAGED rebalance won't
return partial result.
- // Since it calculates for all the eligible resources globally, a
partial result is invalid.
- // TODO propagate the rebalancer failure information to
updateRebalanceStatus for monitoring.
+ if (wagedRebalancer != null) {
Review comment:
Perhaps we should check whether the rebalancer has been closed here?
----------------------------------------------------------------
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]