cloud-fan commented on a change in pull request #23871: 
[SPARK-23433][SPARK-25250] [CORE] Later created TaskSet should learn about the 
finished partitions 
URL: https://github.com/apache/spark/pull/23871#discussion_r261812802
 
 

 ##########
 File path: core/src/main/scala/org/apache/spark/scheduler/TaskSetManager.scala
 ##########
 @@ -797,11 +801,12 @@ private[spark] class TaskSetManager(
     maybeFinishTaskSet()
   }
 
-  private[scheduler] def markPartitionCompleted(partitionId: Int, taskInfo: 
TaskInfo): Unit = {
+  private[scheduler] def markPartitionCompleted(partitionId: Int, taskInfo: 
Option[TaskInfo])
+  : Unit = {
     partitionToIndex.get(partitionId).foreach { index =>
       if (!successful(index)) {
         if (speculationEnabled && !isZombie) {
-          successfulTaskDurations.insert(taskInfo.duration)
+          taskInfo.foreach { info => 
successfulTaskDurations.insert(info.duration) }
 
 Review comment:
   this is existing logic, but I have a question here: Do we really need to do 
it? The task is finished by another TSM, it seems unreasonable to update the 
statistics for launching speculative tasks in this TSM.

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