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

    https://github.com/apache/spark/pull/18171#discussion_r119569510
  
    --- Diff: 
core/src/main/scala/org/apache/spark/scheduler/TaskSchedulerImpl.scala ---
    @@ -240,8 +240,10 @@ private[spark] class TaskSchedulerImpl 
private[scheduler](
             // 2. The task set manager has been created but no tasks has been 
scheduled. In this case,
             //    simply abort the stage.
             tsm.runningTasksSet.foreach { tid =>
    -          val execId = taskIdToExecutorId(tid)
    -          backend.killTask(tid, execId, interruptThread, reason = "stage 
cancelled")
    +          if (taskIdToExecutorId.contains(tid)) {
    +            val execId = taskIdToExecutorId(tid)
    +            backend.killTask(tid, execId, interruptThread)
    --- End diff --
    
    I think you lost the value of "reason" here.
    It's not a big deal but you could also write:
    ```
    taskIdToExecutorId.get(tid).foreach(execId => backend.killTask(tid, execId, 
interruptThread, reason = "stage cancelled"))


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to