Github user witgo commented on a diff in the pull request:

    https://github.com/apache/spark/pull/1877#discussion_r16046073
  
    --- Diff: core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala 
---
    @@ -1024,31 +1024,33 @@ class DAGScheduler(
           case FetchFailed(bmAddress, shuffleId, mapId, reduceId) =>
             // Mark the stage that the reducer was in as unrunnable
             val failedStage = stageIdToStage(task.stageId)
    -        runningStages -= failedStage
    -        // TODO: Cancel running tasks in the stage
    -        logInfo("Marking " + failedStage + " (" + failedStage.name +
    -          ") for resubmision due to a fetch failure")
    -        // Mark the map whose fetch failed as broken in the map stage
    -        val mapStage = shuffleToMapStage(shuffleId)
    -        if (mapId != -1) {
    -          mapStage.removeOutputLoc(mapId, bmAddress)
    -          mapOutputTracker.unregisterMapOutput(shuffleId, mapId, bmAddress)
    -        }
    -        logInfo("The failed fetch was from " + mapStage + " (" + 
mapStage.name +
    -          "); marking it for resubmission")
    -        if (failedStages.isEmpty && eventProcessActor != null) {
    -          // Don't schedule an event to resubmit failed stages if failed 
isn't empty, because
    -          // in that case the event will already have been scheduled. 
eventProcessActor may be
    -          // null during unit tests.
    -          import env.actorSystem.dispatcher
    -          env.actorSystem.scheduler.scheduleOnce(
    -            RESUBMIT_TIMEOUT, eventProcessActor, ResubmitFailedStages)
    -        }
    -        failedStages += failedStage
    -        failedStages += mapStage
    -        // TODO: mark the executor as failed only if there were lots of 
fetch failures on it
    -        if (bmAddress != null) {
    -          handleExecutorLost(bmAddress.executorId, Some(task.epoch))
    +        if (runningStages.contains(failedStage) && 
stage.pendingTasks.contains(task)) {
    --- End diff --
    
    Determines whether a task is present in `stage.pendingTasks`, This avoids 
the issue of the above said


---
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]

Reply via email to