spark-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markhamstra <...@git.apache.org>
Subject [GitHub] incubator-spark pull request: SPARK-1124: Fix infinite retries of ...
Date Mon, 24 Feb 2014 16:03:34 GMT
Github user markhamstra commented on a diff in the pull request:

    https://github.com/apache/incubator-spark/pull/641#discussion_r9996518
  
    --- Diff: core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala ---
    @@ -373,25 +375,26 @@ class DAGScheduler(
               } else {
                 def removeStage(stageId: Int) {
                   // data structures based on Stage
    -              stageIdToStage.get(stageId).foreach { s =>
    -                if (running.contains(s)) {
    +              for (stage <- stageIdToStage.get(stageId)) {
    +                if (running.contains(stage)) {
                       logDebug("Removing running stage %d".format(stageId))
    -                  running -= s
    +                  running -= stage
    +                }
    +                stageToInfos -= stage
    +                for (shuffleDep <- stage.shuffleDep) {
    +                  shuffleToMapStage.remove(shuffleDep.shuffleId)
                     }
    -                stageToInfos -= s
    -                shuffleToMapStage.keys.filter(shuffleToMapStage(_) == s).foreach(shuffleId
=>
    -                  shuffleToMapStage.remove(shuffleId))
    -                if (pendingTasks.contains(s) && !pendingTasks(s).isEmpty) {
    +                if (pendingTasks.contains(stage) && !pendingTasks(stage).isEmpty)
{
                       logDebug("Removing pending status for stage %d".format(stageId))
                     }
    -                pendingTasks -= s
    --- End diff --
    
    Doing so would introduce both a bug and a logging error.  Removing an empty Set from pendingTasks
is normal, expected and desired behavior at this point.  And only unexpected clean-up is intended
to be logged.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message