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/10/07 21:39:03 UTC

[GitHub] [helix] narendly commented on a change in pull request #505: Fix the scenario for tasks being Dropped and Assigned to wrong instance in a loop

narendly commented on a change in pull request #505: Fix the scenario for tasks being Dropped and Assigned to wrong instance in a loop
URL: https://github.com/apache/helix/pull/505#discussion_r332248668
 
 

 ##########
 File path: helix-core/src/main/java/org/apache/helix/task/AbstractTaskDispatcher.java
 ##########
 @@ -306,9 +306,25 @@ public void updatePreviousAssignedTasksStatus(
           } else if (jobState == TaskState.IN_PROGRESS
               && (jobTgtState != TargetState.STOP && jobTgtState != TargetState.DELETE)) {
             // Job is in progress, implying that tasks are being re-tried, so set it to RUNNING
-            paMap.put(pId,
-                new JobRebalancer.PartitionAssignment(instance, TaskPartitionState.RUNNING.name()));
-            assignedPartitions.get(instance).add(pId);
+            String currentStateString =
+                currStateOutput.getCurrentState(jobResource, new Partition(pName), instance);
+            TaskPartitionState stateFromContext = jobCtx.getPartitionState(pId);
+
+            // If current state is null and context is INIT, the task should be dropped and
+            // reassigned in next pipeline.
+            if (currentStateString == null && stateFromContext != null) {
+              // Considered as Dropped case
+              LOG.info(
 
 Review comment:
   When a task is being bootstrapped, you could have the currentstate be null and context be not null (INIT). How do you differentiate that case from this? You would be incorrectly dropping that task partition?

----------------------------------------------------------------
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