-
Notifications
You must be signed in to change notification settings - Fork 28.2k
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-23881][CORE][TEST] Fix flaky test JobCancellationSuite."interruptible iterator of shuffle reader" #20993
Conversation
cc @cloud-fan @advancedxy @dongjoon-hyun PTAL |
// 2. task in reduce stage is blocked as taskCancelledSemaphore is not released until | ||
// JobCancelled event is posted. | ||
// After job being cancelled, task in reduce stage will be cancelled asynchronously, thus | ||
// partial of the inputs should not get processed. |
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.
thus partial of the inputs should not get processed.
->
It's very unlikely that Spark can process 10000 elements between JobCancelled is posted and task is really killed.
LGTM |
Test build #88973 has finished for PR 20993 at commit
|
@jiangxb1987 can you post a Jenkins job link referring the flaky test? |
They're in the JIRA task description
Xianjin YE <[email protected]>于2018年4月6日 周五下午8:58写道:
… @jiangxb1987 <https://github.com/jiangxb1987> can you post a Jenkins job
link referring the flaky test?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#20993 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AEkCjoG-VU-0NyllJGGMgGIw7h_ay_Lvks5tl2ZkgaJpZM4TJoBn>
.
|
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 for this flaky test.
LGTM except one comment.
// JobCancelled event is posted. | ||
// After job being cancelled, task in reduce stage will be cancelled asynchronously, thus | ||
// partial of the inputs should not get processed (It's very unlikely that Spark can process | ||
// 10000 elements between JobCancelled is posted and task is really killed). |
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.
I re-checked the killTask
code. I believe there's still possibility(very unlikely) that the reduce task processes all the input elements before task is really killed, then we cannot observe the reduce task being interruptible.
One way to reduce possibility would be increasing the num of input elements. So I believe we should add comments in val numElements = 10000
to make laters know that we choose 10000
for a reason.
Test build #88987 has finished for PR 20993 at commit
|
Test build #89060 has finished for PR 20993 at commit
|
The latest commit is just to add new comments in the code. The previous test already passed. Merged to master/2.3 |
…uptible iterator of shuffle reader" ## What changes were proposed in this pull request? The test case JobCancellationSuite."interruptible iterator of shuffle reader" has been flaky because `KillTask` event is handled asynchronously, so it can happen that the semaphore is released but the task is still running. Actually we only have to check if the total number of processed elements is less than the input elements number, so we know the task get cancelled. ## How was this patch tested? The new test case still fails without the purposed patch, and succeeded in current master. Author: Xingbo Jiang <[email protected]> Closes #20993 from jiangxb1987/JobCancellationSuite. (cherry picked from commit d81f29e) Signed-off-by: gatorsmile <[email protected]>
…uptible iterator of shuffle reader" The test case JobCancellationSuite."interruptible iterator of shuffle reader" has been flaky because `KillTask` event is handled asynchronously, so it can happen that the semaphore is released but the task is still running. Actually we only have to check if the total number of processed elements is less than the input elements number, so we know the task get cancelled. The new test case still fails without the purposed patch, and succeeded in current master. Author: Xingbo Jiang <[email protected]> Closes apache#20993 from jiangxb1987/JobCancellationSuite. (cherry picked from commit d81f29e) Signed-off-by: gatorsmile <[email protected]> Change-Id: I595412f8b6e93223ebf780e30f986c7d0fa99c6e
What changes were proposed in this pull request?
The test case JobCancellationSuite."interruptible iterator of shuffle reader" has been flaky because
KillTask
event is handled asynchronously, so it can happen that the semaphore is released but the task is still running.Actually we only have to check if the total number of processed elements is less than the input elements number, so we know the task get cancelled.
How was this patch tested?
The new test case still fails without the purposed patch, and succeeded in current master.