Github user XuTingjun commented on the pull request:

    https://github.com/apache/spark/pull/6817#issuecomment-116995151
  
    @andrewor14, sorry for my pool English. The problem is :
    when a executor losts, the running tasks on it will be failed, and post a  
```SparkListenerTaskEnd```. Until reach maxTaskFailures, the failed tasks will 
[re-run with a new task 
id](https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/scheduler/TaskSetManager.scala#L720).
 Yeah, the new task will post a ```SparkListenerTaskStart```, and the 
[stageIdToTaskIndices](https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/ExecutorAllocationManager.scala#L556)
 will add. But the [total task 
num](https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/ExecutorAllocationManager.scala#L517)
 only set when ```StageSubmitted```. so the  [numTasksScheduled == 
numTasksTotal](https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/ExecutorAllocationManager.scala#L559)
 won't be accessed, and [pending tasks 
calculation](https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/sp
 ark/ExecutorAllocationManager.scala#L611) will be wrong.



---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to