Github user andrewor14 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/6950#discussion_r33600660
  
    --- Diff: core/src/main/scala/org/apache/spark/ui/exec/ExecutorsTab.scala 
---
    @@ -92,15 +92,18 @@ class ExecutorsListener(storageStatusListener: 
StorageStatusListener) extends Sp
         val info = taskEnd.taskInfo
         if (info != null) {
           val eid = info.executorId
    -      executorToTasksActive(eid) = executorToTasksActive.getOrElse(eid, 1) 
- 1
    -      executorToDuration(eid) = executorToDuration.getOrElse(eid, 0L) + 
info.duration
           taskEnd.reason match {
    +        case Resubmitted =>
    +          return
    --- End diff --
    
    hm, technically this is still incorrect because it uses the metrics of the 
first attempt of this task, which might be incomplete. However, a correct fix 
would be much more complicated (you have to essentially revert the metrics 
added in the failed task).
    
    We should at least add a comment:
    ```
    // Note: For resubmitted tasks, we continue to use the metrics that belong 
to the
    // first attempt of this task. This may not be 100% accurate because the 
first attempt
    // could have failed half-way through. The correct fix would be to keep 
track of the
    // metrics added by each attempt, but this is more complicated.
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to