-
Notifications
You must be signed in to change notification settings - Fork 33
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
fix #86 Add background eviction #100
Conversation
Codecov Report
@@ Coverage Diff @@
## 0.1.x #100 +/- ##
============================================
- Coverage 83.56% 78.61% -4.96%
- Complexity 139 140 +1
============================================
Files 10 11 +1
Lines 639 692 +53
Branches 98 105 +7
============================================
+ Hits 534 544 +10
- Misses 75 116 +41
- Partials 30 32 +2
Continue to review full report at Codecov.
|
9024893
to
57831af
Compare
This commit adds an option for background eviction of resources in case no activity is registered on the pool. Note that the background eviction is best effort, and will back off if there are concurrent release / acquire activity. The later actually checks the eviction predicate too, which allows for some amount of eviction to occur even if the background task has backed off.
57831af
to
2e6f776
Compare
|
||
public class SimpleDequePoolStressTest { | ||
|
||
@JCStressTest | ||
@Outcome(id = "1001, 2, 0, 0", expect = ACCEPTABLE, desc = "evicted, acquired second resource") |
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.
4 state variables make it really hard to reason about this test. Given that 1st and 3rd are always "1001" and "0", can't we get rid of them?
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 don't think so, no. Both these validate that the pool correctly released the resource and that the accounting is correct. Maybe put them as 3rd and 4th variable since slightly less interesting than the second one (acquired)
No description provided.