Ngone51 commented on a change in pull request #22806: [SPARK-25250][CORE] :
Late zombie task completions handled correctly even before new taskset launched
URL: https://github.com/apache/spark/pull/22806#discussion_r246238260
##########
File path:
core/src/main/scala/org/apache/spark/scheduler/TaskSchedulerImpl.scala
##########
@@ -286,6 +286,30 @@ private[spark] class TaskSchedulerImpl(
}
}
+ /**
+ * SPARK-25250: Whenever any Result Task gets successfully completed, we
simply mark the
+ * corresponding partition id as completed in all attempts for that
particular stage. As a
+ * result, we do not see any Killed tasks due to TaskCommitDenied Exceptions
showing up
+ * in the UI.
+ */
+ override def markPartitionIdAsCompletedAndKillCorrespondingTaskAttempts(
+ partitionId: Int, stageId: Int): Unit = {
+ taskSetsByStageIdAndAttempt.getOrElse(stageId, Map()).values.foreach { tsm
=>
+ tsm.partitionToIndex.get(partitionId) match {
+ case Some(index) =>
+ tsm.markPartitionIdAsCompletedForTaskAttempt(index)
Review comment:
I think if `tsm` is the newest `TaskSet`, so, update `taskSuccessful` is
necessary, so that it can have a chance to finish itself at this time. If not,
I think it is not necessary, and even `successful(index) = true` is not.
Because we've already send killing signals to those tasks, so zombie TaskSets
will handle the failed task attempts at the end and finished normally.
(But you tell me `tsm` may not happen to be the newtest TaskSet above, so
I'm not sure about it. )
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]