jiangxb1987 commented on a change in pull request #24497:
[SPARK-27630][CORE]Stage retry causes totalRunningTasks calculation to be
negative
URL: https://github.com/apache/spark/pull/24497#discussion_r285731578
##########
File path: core/src/main/scala/org/apache/spark/ExecutorAllocationManager.scala
##########
@@ -836,9 +830,10 @@ private[spark] class ExecutorAllocationManager(
/**
* The number of tasks currently running across all stages.
+ * Include running-but-zombie stage attempts
*/
def totalRunningTasks(): Int = {
- stageIdToNumRunningTask.values.sum
+ liveTaskIds.size
Review comment:
If you only want to count the total number of active tasks why not count
from `executorIdToTaskIds` ? This way you don't need to store any other data.
----------------------------------------------------------------
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]