squito commented on a change in pull request #24375: [SPARK-27474][CORE] avoid 
retrying a task failed with CommitDeniedException many times
URL: https://github.com/apache/spark/pull/24375#discussion_r276787954
 
 

 ##########
 File path: core/src/main/scala/org/apache/spark/scheduler/TaskSetManager.scala
 ##########
 @@ -819,11 +816,12 @@ private[spark] class TaskSetManager(
     maybeFinishTaskSet()
   }
 
-  private[scheduler] def markPartitionCompleted(partitionId: Int, taskInfo: 
TaskInfo): Unit = {
+  private[scheduler] def markPartitionCompleted(partitionId: Int): Unit = {
     partitionToIndex.get(partitionId).foreach { index =>
       if (!successful(index)) {
         if (speculationEnabled && !isZombie) {
-          successfulTaskDurations.insert(taskInfo.duration)
+          // The task is skipped, its duration should be 0.
+          successfulTaskDurations.insert(0)
 
 Review comment:
   sorry I wasn't clear before -- I don't think you should insert 0, that would 
really mess up the speculation calculation.  I suggested above to pass in the 
duration.  But if there is some reason I'm missing for why that isn't possible, 
then  its OK to go back to the way you originally had it, by entirely skipping 
adding to `successfulTaskDurations.`

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to