squito commented on a change in pull request #24497:
[SPARK-11334][CORE][FOLLOWUP] Fix bug in Executor allocation manager in running
tasks calculation
URL: https://github.com/apache/spark/pull/24497#discussion_r280147169
##########
File path: core/src/main/scala/org/apache/spark/ExecutorAllocationManager.scala
##########
@@ -756,8 +760,11 @@ private[spark] class ExecutorAllocationManager(
val taskId = taskEnd.taskInfo.taskId
val taskIndex = taskEnd.taskInfo.index
val stageId = taskEnd.stageId
+ val stageAttemptId = taskEnd.stageAttemptId
allocationManager.synchronized {
- if (stageIdToNumRunningTask.contains(stageId)) {
+ if (stageIdToNumRunningTask.contains(stageId)
+ && activeStageIdToStageAttemptId.contains(stageId)
+ && activeStageIdToStageAttemptId(stageId) == stageAttemptId) {
Review comment:
indent the continuation of the condition for the `if` more
----------------------------------------------------------------
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]