Github user kayousterhout commented on a diff in the pull request:
https://github.com/apache/spark/pull/16620#discussion_r101392190
--- Diff: core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala
---
@@ -1181,15 +1181,34 @@ 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,
+ // if so, this can result in inconsistency between pending
partitions and output
+ // locations of stage. When pending partitions is empty, the
scheduler will check
+ // output locations, if there is missing, the stage will be
resubmitted.
--- End diff --
one more proposal to improve this comment:
...epoch is too small below. In this case, when pending partitions is
empty, there will still be missing output locations, which will cause the
DAGScheduler to resubmit the stage below.)
---
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]