Uh oh!
There was an error while loading. Please reload this page.
[SPARK-14915] [CORE] Don't re-queue a task if another attempt has already succeeded - #12751
[SPARK-14915] [CORE] Don't re-queue a task if another attempt has already succeeded#12751jasonmoore2k wants to merge 2 commits into
Conversation
Would appreciate your thoughts on this change (or anybody else who you recommend with some experience with the task scheduler). As an aside, the current behavior of allowing a TaskCommitDenied to be retried without limit is probably called into question? See the comment on countTowardsTaskFailures. I haven't testing doing so, but I'm finding that the tasks that fail this way are now (with this change) only attempted once or twice before the other copy that has the lock registers as successful. |
srowen
commented
May 2, 2016
Although that makes some logical sense to me, I'd really like to hear an expert weigh in. Also paging @markhamstra@pwendell . It seems like Andrew conceptually agreed with this change. |
srowen
commented
May 2, 2016
Jenkins test this please |
SparkQA
commented
May 2, 2016
Test build #57534 has finished for PR 12751 at commit
|
andrewor14
commented
May 3, 2016
Yeah, conceptually this LGTM. In speculation if a task already succeeded then the slower failed attempt should not retry it again. @kayousterhout should sign off in case there's corner case that we're missing, though. |
| if (successful(index)) { | ||
| logWarning( | ||
| s"Task ${info.id} in stage ${taskSet.id} (TID $tid) will not be re-queued " + |
There was a problem hiding this comment.
This change mostly looks good, but can you make this log message a little clearer? I'd move it to logInfo (since it's not something the user should be concerned about, so doesn't seem severe enough for warning) and make it say something like "Task ${info.id} in stage ${taskSet.id} failed, but another instance of the task has already succeeded, so not re-queuing the task to be re-executed."
There was a problem hiding this comment.
Too easy, thanks for the review!
kayousterhout
commented
May 5, 2016
With the logging fix, this LGTM! Thanks for fixing this! |
jasonmoore2k
commented
May 5, 2016
Done! Thanks for the review. |
srowen
commented
May 5, 2016
Jenkins retest this please |
SparkQA
commented
May 5, 2016
Test build #57864 has finished for PR 12751 at commit
|
…ady succeeded ## What changes were proposed in this pull request? Don't re-queue a task if another attempt has already succeeded. This currently happens when a speculative task is denied from committing the result due to another copy of the task already having succeeded. ## How was this patch tested? I'm running a job which has a fair bit of skew in the processing time across the tasks for speculation to trigger in the last quarter (default settings), causing many commit denied exceptions to be thrown. Previously, these tasks were then being retried over and over again until the stage possibly completes (despite using compute resources on these superfluous tasks). With this change (applied to the 1.6 branch), they no longer retry and the stage completes successfully without these extra task attempts. Author: Jason Moore <jasonmoore2k@outlook.com> Closes#12751 from jasonmoore2k/SPARK-14915. (cherry picked from commit 77361a4) Signed-off-by: Sean Owen <sowen@cloudera.com>
srowen
commented
May 5, 2016
Merged to master/2.0 |
srowen
commented
May 5, 2016
It seems reasonable if it applies to the same code path cleanly in those branches. Any other opinions? |
jasonmoore2k
commented
May 5, 2016
Great, thanks! Not too concerned with 1.5 (and after checking it out looks like it doesn't go on cleanly), but I've been testing this patch on top of the 1.6 branch. If a 1.6.2 patch gets cut, I'd really like this to be included. |
kayousterhout
commented
May 5, 2016
I'm ok with merging this into 1.6. Usually I argue against back-porting scheduler patches because they tend to be pretty risky and have high potential for serious regressions, but this particular change seems to be fixing a somewhat-bad bug, and is also very surgical. |
…ady succeeded Don't re-queue a task if another attempt has already succeeded. This currently happens when a speculative task is denied from committing the result due to another copy of the task already having succeeded. I'm running a job which has a fair bit of skew in the processing time across the tasks for speculation to trigger in the last quarter (default settings), causing many commit denied exceptions to be thrown. Previously, these tasks were then being retried over and over again until the stage possibly completes (despite using compute resources on these superfluous tasks). With this change (applied to the 1.6 branch), they no longer retry and the stage completes successfully without these extra task attempts. Author: Jason Moore <jasonmoore2k@outlook.com> Closes#12751 from jasonmoore2k/SPARK-14915. (cherry picked from commit 77361a4) Signed-off-by: Sean Owen <sowen@cloudera.com>
srowen
commented
May 5, 2016
I back-ported to 1.6. |
jasonmoore2k
commented
May 5, 2016
Ta! |
zzcclp
commented
May 6, 2016
@srowen , add below code twice into branch 1.6: |
srowen
commented
May 6, 2016
@zzcclp Ooops, weird, I must have somehow missed a step in resolving the merge conflict. I'll get that fixed ASAP |
srowen
commented
May 6, 2016
Fixing the back-port in #12950 |
…ady succeeded Don't re-queue a task if another attempt has already succeeded. This currently happens when a speculative task is denied from committing the result due to another copy of the task already having succeeded. I'm running a job which has a fair bit of skew in the processing time across the tasks for speculation to trigger in the last quarter (default settings), causing many commit denied exceptions to be thrown. Previously, these tasks were then being retried over and over again until the stage possibly completes (despite using compute resources on these superfluous tasks). With this change (applied to the 1.6 branch), they no longer retry and the stage completes successfully without these extra task attempts. Author: Jason Moore <jasonmoore2k@outlook.com> Closesapache#12751 from jasonmoore2k/SPARK-14915. (cherry picked from commit 77361a4) Signed-off-by: Sean Owen <sowen@cloudera.com> (cherry picked from commit bf3c060)
What changes were proposed in this pull request?
Don't re-queue a task if another attempt has already succeeded. This currently happens when a speculative task is denied from committing the result due to another copy of the task already having succeeded.
How was this patch tested?
I'm running a job which has a fair bit of skew in the processing time across the tasks for speculation to trigger in the last quarter (default settings), causing many commit denied exceptions to be thrown. Previously, these tasks were then being retried over and over again until the stage possibly completes (despite using compute resources on these superfluous tasks). With this change (applied to the 1.6 branch), they no longer retry and the stage completes successfully without these extra task attempts.