-
Notifications
You must be signed in to change notification settings - Fork 140
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
[#1267][followup] improvement(client): The previous exception may be discarded when OOM occurs #1411
Conversation
…scarded when OOM occurs
cc39876
to
3194717
Compare
PTAL @zuston |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #1411 +/- ##
============================================
+ Coverage 53.24% 55.15% +1.91%
- Complexity 2719 2773 +54
============================================
Files 419 403 -16
Lines 23966 21823 -2143
Branches 2042 2058 +16
============================================
- Hits 12760 12036 -724
+ Misses 10418 9048 -1370
+ Partials 788 739 -49 ☔ View full report in Codecov by Sentry. |
@zuston Can you review this? |
Some details have been improved, please review. @zuston @jerqi
|
cc @zuston |
client-spark/spark3/src/main/java/org/apache/spark/shuffle/DelegationRssShuffleManager.java
Outdated
Show resolved
Hide resolved
@@ -154,7 +155,7 @@ public RssSendShuffleDataResponse sendShuffleData(RssSendShuffleDataRequest requ | |||
maxRetryAttempts, | |||
t -> !(t instanceof OutOfMemoryError)); | |||
} catch (Throwable throwable) { | |||
LOG.warn(throwable.getMessage()); | |||
LOG.warn(ExceptionUtils.getStackTrace(throwable)); |
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.
why not using throwable
directly ?
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.
Because LOG.warn
does not accept a Throwable
type parameter, it only accepts a string.
As I mentioned above, I use ExceptionUtils.getStackTrace(e)
just for the sake of minimal code changes and simplicity.
If you prefer using throwable
directly, I will change it like below:
LOG.warn("Failed to send shuffle data due to ", throwable);
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.
LOG.warn("Failed to send shuffle data due to ", throwable);
+1
internal-client/src/main/java/org/apache/uniffle/client/impl/grpc/ShuffleServerGrpcClient.java
Outdated
Show resolved
Hide resolved
common/src/main/java/org/apache/uniffle/common/util/RetryUtils.java
Outdated
Show resolved
Hide resolved
c1349ca
to
6950f33
Compare
common/src/main/java/org/apache/uniffle/common/util/RetryUtils.java
Outdated
Show resolved
Hide resolved
Can you continue to review this PR? I think at least for my case, this PR is still very useful. @zuston |
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 the late reply, I missed this thread.
Left some comments. If you have any process, please ping me @rickyma
client-spark/spark3/src/main/java/org/apache/spark/shuffle/DelegationRssShuffleManager.java
Outdated
Show resolved
Hide resolved
internal-client/src/main/java/org/apache/uniffle/client/impl/grpc/ShuffleServerGrpcClient.java
Outdated
Show resolved
Hide resolved
@@ -154,7 +155,7 @@ public RssSendShuffleDataResponse sendShuffleData(RssSendShuffleDataRequest requ | |||
maxRetryAttempts, | |||
t -> !(t instanceof OutOfMemoryError)); | |||
} catch (Throwable throwable) { | |||
LOG.warn(throwable.getMessage()); | |||
LOG.warn(ExceptionUtils.getStackTrace(throwable)); |
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.
LOG.warn("Failed to send shuffle data due to ", throwable);
+1
common/src/main/java/org/apache/uniffle/common/util/RetryUtils.java
Outdated
Show resolved
Hide resolved
99c6c40
to
45c422d
Compare
Done. @zuston |
45c422d
to
3b9d9fe
Compare
…ay be discarded when OOM occurs
3b9d9fe
to
e6274c2
Compare
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. Thanks for your effort @rickyma
…in RetryUtils (#1500) ### What changes were proposed in this pull request? INFO log level should be used in RetryUtils. Because these log messages are not actual errors. ### Why are the changes needed? It's a followup PR for [#1411](#1411). ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Existing UTs.
What changes were proposed in this pull request?
Save the previous exception in advance to prevent it from being lost during the next retry.
Why are the changes needed?
This is the follow up pr of #1344
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Existing UTs.