-
Notifications
You must be signed in to change notification settings - Fork 154
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
[#2380] Improvement: Eagerly cancel rpc request #2381
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:
|
c58ee34
to
7b0f563
Compare
@jerqi @LuciferYang PTAL |
also cc @advancedxy |
Seems we should add a new test to cover this |
7b0f563
to
083f508
Compare
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
What changes were proposed in this pull request?
needCancel
takes effect in rpc retryWhy 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: #2380
Does this PR introduce any user-facing change?
No.
How was this patch tested?
UT