You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by GitBox <gi...@apache.org> on 2019/08/11 00:27:55 UTC

[GitHub] [helix] narendly commented on a change in pull request #400: TASK: Drop all tasks whose requested states are DROPPED

narendly commented on a change in pull request #400: TASK: Drop all tasks whose requested states are DROPPED
URL: https://github.com/apache/helix/pull/400#discussion_r312719056
 
 

 ##########
 File path: helix-core/src/main/java/org/apache/helix/task/JobDispatcher.java
 ##########
 @@ -425,25 +425,29 @@ private static boolean isJobComplete(JobContext ctx, Set<Integer> allPartitions,
         TaskPartitionState currState = TaskPartitionState.valueOf(instanceToCurrState.getValue());
         int pId = TaskUtil.getPartitionId(entry.getKey().getPartitionName());
 
-        // We must add all active task pIds back here because dropping transition could overwrite an
-        // active transition in paMap
-        // Add all task partitions in the following states:
-        // currState = INIT, requestedState = RUNNING (bootstrap)
-        // currState = RUNNING, requestedState = ANY (active)
-        // ** for tasks that are just in INIT state, we do not add them here because old
-        // Participants, upon connection reset, set tasks' currentStates to INIT. We cannot consider
-        // those tasks active **
-        if (result.containsKey(instance) && (currState == TaskPartitionState.INIT
-            && requestedState != null && requestedState.equals(TaskPartitionState.RUNNING.name())
-            || currState == TaskPartitionState.RUNNING)) {
-          // Check if this is a dropping transition
+        if (result.containsKey(instance)) {
+          // We must add all active task pIds back here because dropping transition could overwrite
+          // an active transition in paMap
+          // Add all task partitions in the following states:
+          // currState = INIT, requestedState = RUNNING (bootstrap)
+          // currState = RUNNING, requestedState = ANY (active)
+          // ** for tasks that are just in INIT state, we do not add them here because old
+          // Participants, upon connection reset, set tasks' currentStates to INIT. We cannot
+          // consider those tasks active **
+          if (currState == TaskPartitionState.INIT && requestedState != null
 
 Review comment:
   See the next block where all tasks with their requested state is DROPPED get added to tasksToDrop.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org