cxzl25 commented on a change in pull request #24497: [SPARK-27630][CORE]
Properly handle task end events from completed stages
URL: https://github.com/apache/spark/pull/24497#discussion_r296571373
##########
File path: core/src/main/scala/org/apache/spark/ExecutorAllocationManager.scala
##########
@@ -629,14 +645,14 @@ private[spark] class ExecutorAllocationManager(
* Note: This is not thread-safe without the caller owning the
`allocationManager` lock.
*/
def pendingTasks(): Int = {
- stageIdToNumTasks.map { case (stageId, numTasks) =>
- numTasks - stageIdToTaskIndices.get(stageId).map(_.size).getOrElse(0)
+ stageAttemptToNumTasks.map { case (stageAttempt, numTasks) =>
+ numTasks -
stageAttemptToTaskIndices.get(stageAttempt).map(_.size).getOrElse(0)
Review comment:
In ```onStageCompleted``` processing, ```stageAttemptToNumTasks```,
```stageAttemptToTaskIndices``` removes the zombie stage, so pendingTasks does
not calculate the zombie stage's task.
----------------------------------------------------------------
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]