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/26 18:24:17 UTC

[GitHub] [helix] dasahcc commented on a change in pull request #432: TASK: Fix incorrect counting of numAttempts for tasks

dasahcc commented on a change in pull request #432: TASK: Fix incorrect counting of numAttempts for tasks
URL: https://github.com/apache/helix/pull/432#discussion_r317734113
 
 

 ##########
 File path: helix-core/src/main/java/org/apache/helix/task/AbstractTaskDispatcher.java
 ##########
 @@ -122,7 +122,9 @@ public void updatePreviousAssignedTasksStatus(
         if (currState == TaskPartitionState.ERROR || currState == TaskPartitionState.TASK_ERROR
             || currState == TaskPartitionState.TIMED_OUT
             || currState == TaskPartitionState.TASK_ABORTED) {
-          markPartitionError(jobCtx, pId, currState, true);
+          // Do not increment the task attempt count - it will be done at scheduling time.
+          // (incrementAttempts should always be false)
+          markPartitionError(jobCtx, pId, currState, false);
 
 Review comment:
   Since I did not see any usage of incrementAttempts in markPartitionError, shall we remove the increase logic in the markPartitionError function? Also, it will keep consistent behavior between markPartitionError and markPartitionCompleted.

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