You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/11/16 06:50:56 UTC
[GitHub] [spark] sleep1661 commented on a change in pull request #34578: [SPARK-37300][CORE] TaskSchedulerImpl should ignore task finished eve…
sleep1661 commented on a change in pull request #34578:
URL: https://github.com/apache/spark/pull/34578#discussion_r749952744
##########
File path: core/src/main/scala/org/apache/spark/scheduler/TaskSchedulerImpl.scala
##########
@@ -871,19 +871,23 @@ private[spark] class TaskSchedulerImpl(
taskSetManager: TaskSetManager,
tid: Long,
taskResult: DirectTaskResult[_]): Unit = synchronized {
- taskSetManager.handleSuccessfulTask(tid, taskResult)
+ if (!taskSetManager.taskFinished(tid)) {
+ taskSetManager.handleSuccessfulTask(tid, taskResult)
+ }
}
def handleFailedTask(
taskSetManager: TaskSetManager,
tid: Long,
taskState: TaskState,
reason: TaskFailedReason): Unit = synchronized {
- taskSetManager.handleFailedTask(tid, taskState, reason)
- if (!taskSetManager.isZombie && !taskSetManager.someAttemptSucceeded(tid)) {
- // Need to revive offers again now that the task set manager state has been updated to
- // reflect failed tasks that need to be re-run.
- backend.reviveOffers()
+ if (!taskSetManager.taskFinished(tid)) {
+ taskSetManager.handleFailedTask(tid, taskState, reason)
Review comment:
Yes, i agree. Inside state checking will be more safer.
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org