-
Notifications
You must be signed in to change notification settings - Fork 28.3k
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
[SPARK-27590][CORE] do not consider skipped tasks when scheduling speculative tasks #24485
Conversation
Test build #104986 has finished for PR 24485 at commit
|
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.
lgtm, just a small suggestion on a cleanup
// `successfulTaskDurations` may not equal to `tasksSuccessful`. Here we should only count the | ||
// tasks that are submitted by this `TaskSetManager` and are completed successfully. | ||
val numSuccessfulTasks = successfulTaskDurations.size() | ||
if (numSuccessfulTasks >= minFinishedForSpeculation && numSuccessfulTasks > 0) { |
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.
unrelated to your change, but a potential cleanup here -- why not compute minFinishedForSpeculation
in the construction, and even set it to math.max(1, (speculationQuantile * numTasks).floor.toInt)
? Then you also don't need the extra numSuccessfulTasks > 0
here.
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.
+1
LGTM |
Test build #105143 has finished for PR 24485 at commit
|
retest this please |
Test build #105150 has finished for PR 24485 at commit
|
@@ -1032,14 +1032,14 @@ private[spark] class TaskSetManager( | |||
return false | |||
} | |||
var foundTasks = false | |||
val minFinishedForSpeculation = (speculationQuantile * numTasks).floor.toInt | |||
val minFinishedForSpeculation = math.max((speculationQuantile * numTasks).floor.toInt, 1) |
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.
sorry I had actually meant to just compute this once in the constructor, eg. around line 70
Test build #105160 has finished for PR 24485 at commit
|
Test build #105186 has finished for PR 24485 at commit
|
merged to master. Thanks @cloud-fan ! |
@squito thanks for the review and merge! |
What changes were proposed in this pull request?
This is a followup of #24375
When
TaskSetManager
skips a task because its corresponding partition is already completed by otherTaskSetManager
s, we should not consider the duration of the task that is finished by otherTaskSetManager
s to schedule the speculative tasks of thisTaskSetManager
.How was this patch tested?
updated test case