Github user squito commented on a diff in the pull request:
https://github.com/apache/spark/pull/16620#discussion_r101070245
--- Diff: core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala
---
@@ -1181,15 +1181,31 @@ class DAGScheduler(
case smt: ShuffleMapTask =>
val shuffleStage = stage.asInstanceOf[ShuffleMapStage]
- shuffleStage.pendingPartitions -= task.partitionId
updateAccumulators(event)
val status = event.result.asInstanceOf[MapStatus]
val execId = status.location.executorId
logDebug("ShuffleMapTask finished on " + execId)
+ if (stageIdToStage(task.stageId).latestInfo.attemptId ==
task.stageAttemptId) {
+ // This task was for the currently running attempt of the
stage. Since the task
+ // completed successfully from the perspective of the
TaskSetManager, mark it as
+ // no longer pending (the TaskSetManager may consider the
task complete even
+ // when the output needs to be ignored because the task's
epoch is too small below).
+ shuffleStage.pendingPartitions -= task.partitionId
--- End diff --
I think its worth also explaining how this inconsistency between
pendingPartitions and outputLocations gets resolved. IIUC, its that when the
pendingPartitions is empty, the scheduler will check outputLocations, realize
something is missing, and resubmit this stage.
---
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]