Github user dongjoon-hyun commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22771#discussion_r226847830
  
    --- Diff: core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala 
---
    @@ -1364,6 +1385,16 @@ private[spark] class DAGScheduler(
                       if (job.numFinished == job.numPartitions) {
                         markStageAsFinished(resultStage)
                         cleanupStateForJobAndIndependentStages(job)
    +                    try { // cancelTasks will fail if a SchedulerBackend 
does not implement killTask
    +                      logInfo(
    +                        s"Job ${job.jobId} is finished. Killing 
speculative tasks for this job")
    +                      // ResultStage is only used by this job. It's safe 
to kill speculative or
    +                      // zombie tasks in this stage.
    +                      taskScheduler.cancelTasks(stageId, 
shouldInterruptTaskThread(job))
    --- End diff --
    
    Thanks, @zsxwing . This looks promising to reduce the flakiness in some 
test suite.


---

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

Reply via email to