wangshengjie123 commented on a change in pull request #34834:
URL: https://github.com/apache/spark/pull/34834#discussion_r769388137
##########
File path: core/src/main/scala/org/apache/spark/scheduler/TaskSetManager.scala
##########
@@ -960,19 +960,27 @@ private[spark] class TaskSetManager(
assert (null != failureReason)
taskSetExcludelistHelperOpt.foreach(_.updateExcludedForFailedTask(
info.host, info.executorId, index, failureReason))
- numFailures(index) += 1
- if (numFailures(index) >= maxTaskFailures) {
- logError("Task %d in stage %s failed %d times; aborting job".format(
- index, taskSet.id, maxTaskFailures))
- abort("Task %d in stage %s failed %d times, most recent failure:
%s\nDriver stacktrace:"
- .format(index, taskSet.id, maxTaskFailures, failureReason),
failureException)
- return
+ if (!successful(index)) {
+ numFailures(index) += 1
+ if (numFailures(index) >= maxTaskFailures && !successful(index)) {
+ logError("Task %d in stage %s failed %d times; aborting job".format(
+ index, taskSet.id, maxTaskFailures))
+ abort("Task %d in stage %s failed %d times, most recent failure:
%s\nDriver stacktrace:"
+ .format(index, taskSet.id, maxTaskFailures, failureReason),
failureException)
+ return
+ }
}
}
if (successful(index)) {
- logInfo(s"${taskName(info.taskId)} failed, but the task will not" +
- " be re-executed (either because the task failed with a shuffle data
fetch failure," +
+ val message = if (numFailures(index) >= maxTaskFailures) {
Review comment:
It seems if we reset the `numFailures`, this log should be rollback, i
will rollback this log
--
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]