-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-13343] speculative tasks that didn't commit shouldn't be marked as success #21653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
8f7d981
980a933
7db26f2
f66fcab
3c655f2
7d9e4bb
2c7d33d
b6585da
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,7 +29,7 @@ import org.apache.spark._ | |
| import org.apache.spark.TaskState.TaskState | ||
| import org.apache.spark.internal.{config, Logging} | ||
| import org.apache.spark.scheduler.SchedulingMode._ | ||
| import org.apache.spark.util.{AccumulatorV2, Clock, SystemClock, Utils} | ||
| import org.apache.spark.util.{AccumulatorV2, Clock, LongAccumulator, SystemClock, Utils} | ||
| import org.apache.spark.util.collection.MedianHeap | ||
|
|
||
| /** | ||
|
|
@@ -724,7 +724,15 @@ private[spark] class TaskSetManager( | |
| val info = taskInfos(tid) | ||
| val index = info.index | ||
| // Check if any other attempt succeeded before this and this attempt has not been handled | ||
| if (successful(index) && killedByOtherAttempt(index)) { | ||
| if (successful(index) && killedByOtherAttempt.contains(tid)) { | ||
| calculatedTasks -= 1 | ||
|
|
||
| val resultSizeAcc = result.accumUpdates.find(a => | ||
| a.name == Some(InternalAccumulator.RESULT_SIZE)) | ||
| if (resultSizeAcc.isDefined) { | ||
| totalResultSize -= resultSizeAcc.get.asInstanceOf[LongAccumulator].value | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the downside here is we already incremented and other tasks could have checked and failed before we decrement, but unless someone else has a better idea this is better then it is now.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree, I dont see a better option. |
||
| } | ||
|
|
||
| handleFailedTask(tid, TaskState.KILLED, | ||
| TaskKilled("Finish but did not commit due to another attempt succeeded")) | ||
| return | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add a comment here about cleaning up things from incremented earlier while handling it as successful