Ngone51 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_r296565937
########## 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: I think we should not take tasks from previous stage attempts, which are already zombie, into account, right ? ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org