JoshRosen commented on code in PR #43954:
URL: https://github.com/apache/spark/pull/43954#discussion_r1402598488


##########
core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala:
##########
@@ -1871,21 +1871,6 @@ private[spark] class DAGScheduler(
                     markStageAsFinished(resultStage)
                     cancelRunningIndependentStages(job, s"Job ${job.jobId} is 
finished.")
                     cleanupStateForJobAndIndependentStages(job)
-                    try {
-                      // killAllTaskAttempts will fail if a SchedulerBackend 
does not implement
-                      // killTask.
-                      logInfo(s"Job ${job.jobId} is finished. Cancelling 
potential speculative " +
-                        "or zombie tasks for this job")
-                      // ResultStage is only used by this job. It's safe to 
kill speculative or
-                      // zombie tasks in this stage.
-                      taskScheduler.killAllTaskAttempts(

Review Comment:
   I agree:
   
   It looks like `taskScheduler.killAllTaskAttempts` was added in 
https://github.com/apache/spark/pull/22771 and at that time 
`cancelRunningIndependentStages` did not exist. The 
`cancelRunningIndependentStages` method was added later in 
https://github.com/apache/spark/pull/27050 and is a generalization to cancel 
both the extra tasks from the finished stage and plus any other independent 
zombie stage attempts.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to