GrantPSpencer commented on code in PR #2595:
URL: https://github.com/apache/helix/pull/2595#discussion_r1293992640
##########
helix-core/src/main/java/org/apache/helix/controller/rebalancer/util/DelayedRebalanceUtil.java:
##########
@@ -135,9 +135,17 @@ private static Set<String> getActiveNodes(Set<String>
allNodes, Set<String> live
private static long getInactiveTime(String instance, Set<String>
liveInstances, Long offlineTime,
long delay, InstanceConfig instanceConfig, ClusterConfig clusterConfig) {
long inactiveTime = Long.MAX_VALUE;
+ long lastOnDemandRebalanceTime =
clusterConfig.getLastOnDemandRebalanceTimestamp();
- // check the time instance went offline.
+ // Check if the given instance is offline
if (!liveInstances.contains(instance)) {
+ // Check if the offline instance is forced to be rebalanced by an
on-demand rebalance.
+ // If so, return it as an inactive instance.
+ if (isInstanceForcedToBeRebalancded(offlineTime, delay,
lastOnDemandRebalanceTime)) {
Review Comment:
nit: typo
rebalancDed --> rebalanced
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]