-
Notifications
You must be signed in to change notification settings - Fork 136
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
[#1472][part-3] fix(client): Fix occasional IllegalReferenceCountException issues in extremely rare scenarios #1522
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1522 +/- ##
============================================
+ Coverage 54.27% 55.18% +0.91%
+ Complexity 2807 2806 -1
============================================
Files 427 410 -17
Lines 24349 22057 -2292
Branches 2077 2081 +4
============================================
- Hits 13215 12172 -1043
+ Misses 10305 9125 -1180
+ Partials 829 760 -69 ☔ View full report in Codecov by Sentry. |
What if we would make sure that
Then we wouldn't need to add logic that requires internal knowledge of |
Your approach might not solve this issue. Because my previous code was written in a similar way to yours. The cause is unclear at the moment, we can investigate further in the future. But at least for now, the changes I've made will definitely not cause any problems and will solve this issue. |
We need this fix currently. It will not cause any side effects. @jerqi |
TBH, this looks more like a hack than a fix. Usually such issues won't be investigated further once a workaround is merged. |
I can add TODO in comments for now. It is a tricky bug. We need to fix this immediately. |
@@ -106,7 +106,7 @@ public boolean isEmpty() { | |||
} | |||
|
|||
public void release() { | |||
if (this.buffer != null) { | |||
if (this.buffer != null && this.getDataBuf() != null && this.getDataBuf().refCnt() > 0) { |
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 add some logs to help us to find the root cause of this issue?
…ntException issues in extremely rare scenarios
224f79b
to
5cfa1c8
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.
…ler.readShuffleData (#1536) ### What changes were proposed in this pull request? Fix IllegalReferenceCountException issues when exceptions happened in clientReadHandler.readShuffleData(). ### Why are the changes needed? A follow-up PR for: #1522 ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Existing UTs.
What changes were proposed in this pull request?
Improve the robustness of methods
ShuffleDataResult.release()
andShuffleIndexResult.release()
to fix occasional IllegalReferenceCountException issues in extremely rare scenarios.Why are the changes needed?
A sub PR for: #1519
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Existing UTs.