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

    https://github.com/apache/spark/pull/12060#discussion_r58172201
  
    --- Diff: core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala 
---
    @@ -750,23 +764,20 @@ class DAGScheduler(
             submitStage(stage)
           }
         }
    -    submitWaitingStages()
       }
     
       /**
        * Check for waiting stages which are now eligible for resubmission.
    -   * Ordinarily run on every iteration of the event loop.
    +   * Ordinarily run after the parent stage completed successfully.
        */
    -  private def submitWaitingStages() {
    -    // TODO: We might want to run this less often, when we are sure that 
something has become
    -    // runnable that wasn't before.
    +  private def submitWaitingChildStages(parent: Stage) {
         logTrace("Checking for newly runnable parent stages")
         logTrace("running: " + runningStages)
         logTrace("waiting: " + waitingStages)
         logTrace("failed: " + failedStages)
    -    val waitingStagesCopy = waitingStages.toArray
    -    waitingStages.clear()
    -    for (stage <- waitingStagesCopy.sortBy(_.firstJobId)) {
    +    val childStages = 
waitingStages.filter(_.parents.contains(parent)).toArray
    +    waitingStages --= childStages
    +    for (stage <- childStages.sortBy(_.firstJobId)) {
           submitStage(stage)
    --- End diff --
    
    Yes, and the re-check is done in the `submitStage()`.
    If there are some missing parent stages, the child will go to 
`waitingStages` again.


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to