Github user XuTingjun commented on a diff in the pull request:
https://github.com/apache/spark/pull/6817#discussion_r36377614
--- Diff:
core/src/main/scala/org/apache/spark/ExecutorAllocationManager.scala ---
@@ -628,6 +621,13 @@ private[spark] class ExecutorAllocationManager(
allocationManager.onExecutorIdle(executorId)
}
}
+
+ // If the task failed, we expect it to be resubmitted later.
+ if (taskEnd.reason != Success) {
+ stageIdToTaskIndices.get(stageId).foreach { taskIndices =>
+ taskIndices.remove(taskIndex)
--- End diff --
Andrew noted before:
> If anything, I would think that we should remove [this
line](https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/ExecutorAllocationManager.scala#L606).
If this task fails, then the next attempt would go to the else case of
stageIdNumTasks.getOrElse(stageId, -1), which not technically correct. It's
safe to remove it because we remove it in stageCompleted anyway.
I agree with this option, so I delete the Line 602-610. After delete these
lines, we needn't call ``` allocationManager.onSchedulerBacklogged()``` any
more, because ```allocationManager.onSchedulerQueueEmpty()``` only called when
all stages finish.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]