Github user kongweihan commented on a diff in the pull request:

    https://github.com/apache/helix/pull/89#discussion_r115853776
  
    --- Diff: helix-core/src/main/java/org/apache/helix/task/JobRebalancer.java 
---
    @@ -704,4 +712,30 @@ private PartitionAssignment(String instance, String 
state) {
           _state = state;
         }
       }
    +
    +  /**
    +   * Reset RUNNING/INIT tasks count in JobRebalancer
    +   */
    +  public static void resetActiveTaskCount(Collection<String> 
liveInstances, CurrentStateOutput currentStateOutput) {
    +    // init participant map
    +    for (String liveInstance : liveInstances) {
    +      participantActiveTaskCount.put(liveInstance, 0);
    +    }
    +    // Active task == init and running tasks
    +    
fillActiveTaskCount(currentStateOutput.getPartitionCountWithPendingState(TaskConstants.STATE_MODEL_NAME,
    --- End diff --
    
    Is there any case where `INIT` is the toState?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to