-
Notifications
You must be signed in to change notification settings - Fork 160
[#1264][FEATURE][SPARK] Support cancel async thread of handle blockEvent and rpc when writer is killed #2381
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
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2381 +/- ##
============================================
- Coverage 51.34% 51.21% -0.14%
+ Complexity 3615 3016 -599
============================================
Files 571 481 -90
Lines 32892 23193 -9699
Branches 2833 2140 -693
============================================
- Hits 16890 11878 -5012
+ Misses 14932 10569 -4363
+ Partials 1070 746 -324 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Test Results 3 008 files - 11 3 008 suites - 11 6h 38m 27s ⏱️ - 6m 23s For more details on these errors, see this check. Results for commit be8ca4e. ± Comparison against base commit 94e211c. ♻️ This comment has been updated with latest results. |
c58ee34
to
7b0f563
Compare
@jerqi @LuciferYang PTAL |
also cc @advancedxy |
Seems we should add a new test to cover this |
26b3240
to
56fa5ad
Compare
gentle ping @LuciferYang @advancedxy |
@@ -29,26 +30,29 @@ public class RssSendShuffleDataRequest { | |||
private int retryMax; | |||
private long retryIntervalMax; | |||
private Map<Integer, Map<Integer, List<ShuffleBlockInfo>>> shuffleIdToBlocks; | |||
private Supplier<Boolean> needCancel; |
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 think this is kind of leaking details or making RssSendShuffleDataRequest holding references to the sending class, for spark, it's DataPusher. I'm not sure this is the elegant way to do that.
Is it possible for
boolean result = ClientUtils.waitUntilDoneOrFail(futures, allowFastFail);
in ShuffleWriteClientImpl to be aware of interruption/spark cancellation, and cancels all the sending futures?
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.
Actually, current Datapusher
leake details to sending class, this pr does not make it worse, but achive a eagerly cancel in rpc retry level.
Aware of interruption/spark cancellation
is a good idea, i'll follow this way
212a7f9
to
2ddac28
Compare
f0f99ac
to
6ef48ad
Compare
b3bf49f
to
18b7a80
Compare
18b7a80
to
be8ca4e
Compare
What changes were proposed in this pull request?
Cancel all the runnable that are wait to be executed or blocked in waiting for rpc callback
Why are the changes needed?
This is helpful when current task is killed since speculation task attempts succeed, but the rpc of which send data still keep retrying
Fix: #1264
Does this PR introduce any user-facing change?
No.
How was this patch tested?
UT