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

    https://github.com/apache/spark/pull/22771#discussion_r226818782
  
    --- 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))
    +                    } catch {
    +                      case e: UnsupportedOperationException =>
    +                        logInfo(s"Could not cancel tasks for stage 
$stageId", e)
    --- End diff --
    
    logWarn? aren't we leaking tasks?


---

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

Reply via email to