-
Notifications
You must be signed in to change notification settings - Fork 170
[ISSUE-76] Disallow sendShuffleData if requireBufferId expired #159
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
Conversation
|
Could we add a ut for this pr? |
Codecov Report
@@ Coverage Diff @@
## master #159 +/- ##
============================================
+ Coverage 57.17% 57.93% +0.76%
- Complexity 1201 1233 +32
============================================
Files 150 153 +3
Lines 8178 8250 +72
Branches 773 771 -2
============================================
+ Hits 4676 4780 +104
+ Misses 3256 3226 -30
+ Partials 246 244 -2
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
internal-client/src/main/java/org/apache/uniffle/client/impl/grpc/ShuffleServerGrpcClient.java
Show resolved
Hide resolved
| int retryNum = 0; | ||
| while (retryNum < maxRetryAttempts) { | ||
| try { | ||
| long requireId = requirePreAllocation(size, request.getRetryMax(), request.getRetryIntervalMax()); |
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.
Could we reuse RetryUtils?
| } | ||
|
|
||
| private SendShuffleDataResponse doSendData(SendShuffleDataRequest rpcRequest) { | ||
| private SendShuffleDataResponse doSendData(String appId, int size, RssSendShuffleDataRequest request, |
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.
Method doXXXXX usually have one rpc operation. Could we encapsulate the behavior in the other places?
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, This is an important pr, so cc @colinmjj
|
To avoid possible OOM in server side, LGTM, +1 |
|
Merged. Thanks @xianjingfeng |
What changes were proposed in this pull request?
1.In server side, if requireBufferId not found when send data, thrown an exception.
2.In client side, if fail to send data, require buffer again.
Why are the changes needed?
We found shuffle server which under high load is easy encounter java.lang.OutOfMemoryError: Java heap space even we allocate more jvm heap memory and less rss.server.buffer.capacity #76
Does this PR introduce any user-facing change?
No
How was this patch tested?
Have already verify in our production enviroment.