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
[ISSUE #3318] Fix keep waiting for acquiring memory unexpectedly #3335
Conversation
…unexpectedly error and add unit test.
final long objectSize = inst.getObjectSize(o); | ||
while (sum + objectSize >= memoryLimit) { | ||
while (memory.sum() + objectSize >= memoryLimit) { |
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.
hi,sum + objectSize
and memory.sum() + objectSize
What's the difference?
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.
In the while loop, memory.sum()
gets the latest value.
…unexpectedly error and add unit test.
Codecov Report
@@ Coverage Diff @@
## master #3335 +/- ##
============================================
+ Coverage 65.40% 65.71% +0.30%
- Complexity 5204 5230 +26
============================================
Files 746 746
Lines 21020 21024 +4
Branches 1919 1920 +1
============================================
+ Hits 13749 13816 +67
+ Misses 5992 5925 -67
- Partials 1279 1283 +4
Continue to review full report at Codecov.
|
@Albertsirius thanks for your contribution ! |
Issue #3318 , fix
MemoryLimiter.acquireInterruptibly
keep waiting unexpectedly error. Add an unit test classMemoryLimiterTest
Make sure that:
mvn clean install -Dmaven.javadoc.skip=true
.