Github user markhamstra commented on a diff in the pull request:
https://github.com/apache/spark/pull/1561#discussion_r15331775
--- Diff: core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala
---
@@ -355,14 +351,13 @@ class DAGScheduler(
logDebug("Removing running stage %d".format(stageId))
runningStages -= stage
}
- stageToInfos -= stage
for ((k, v) <- shuffleToMapStage.find(_._2 == stage)) {
shuffleToMapStage.remove(k)
}
- if (pendingTasks.contains(stage) &&
!pendingTasks(stage).isEmpty) {
+ if (stage.pendingTasks.isDefined &&
!stage.pendingTasks.isEmpty) {
logDebug("Removing pending status for stage
%d".format(stageId))
}
- pendingTasks -= stage
+ stage.pendingTasks = None
--- End diff --
The old pendingTasks needed the clearing step so that it wouldn't continue
to have removed stages mapping to empty sets of remaining tasks. I agree that
a similar step shouldn't be necessary now that pendingTasks is encapsulated in
a Stage that is going away. In fact, in the event of resubmission don't we
want this to _not_ be None, else stage.pendingTasks.get will fail?
---
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.
---