Details
-
Bug
-
Resolution: Fixed
-
Blocker
-
7.0.0-Beta1
-
Triaged
-
1
-
Yes
-
KV-Engine 2021-Jan
Description
There is a bug which, if triggered, will stop a bucket from successfully evicting ever again (until restart/bucket deletion).
Bug introduced in http://review.couchbase.org/c/kv_engine/+/133197 (6.6.1 pre-GA).
item_pager.cc,ItemPager::run |
|
112
|
if (((current > upper) || doEvict || wasNotified) &&
|
113
|
(*available).compare_exchange_strong(inverse, false)) {
|
114
|
if (kvBucket->getItemEvictionPolicy() == EvictionPolicy::Value) {
|
115
|
doEvict = true;
|
116
|
}
|
117
|
|
118
|
++stats.pagerRuns;
|
119
|
|
120
|
if (current <= lower) {
|
121
|
// early exit - no need to run a paging visitor
|
122
|
return true;
|
123
|
}
|
The above change introduced the highlighted early exit; in the event that the item pager is notified to run, but the memory usage has dropped below the low watermark, don't evict. However, this is not safe to do -
item_pager.cc,ItemPager::run |
|
112
|
if (((current > upper) || doEvict || wasNotified) &&
|
113
|
(*available).compare_exchange_strong(inverse, false)) {
|
Available is an atomic bool used to track if an item pager is currently running. It has been set to false here, but is only reset once the created PagingVisitor is completed. If the visitor creation is skipped, the flag is never reset, so no further item pager runs will occur.
Attachments
Issue Links
- is caused by
-
MB-40531 HiFi MRU Item Pager evicts active items when 2-bit LRU does not
- Closed
For Gerrit Dashboard: MB-43055 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
141367,3 | MB-43055: Ensure ItemPager available is not left set to false | mad-hatter | kv_engine | Status: MERGED | +2 | +1 |
141431,17 | Adding functional test for MB-43055 | mad-hatter | TAF | Status: MERGED | +2 | +1 |
141567,4 | Adding functional test for MB-43055 | master | TAF | Status: MERGED | +2 | +1 |
142430,1 | Merge branch 'mad-hatter' into master | master | kv_engine | Status: MERGED | +2 | +1 |
142975,2 | MB-43055: [BP] Ensure ItemPager available is not left set to false | 6.5.2 | kv_engine | Status: MERGED | +2 | +1 |
142986,3 | MB-43055: [BP] Ensure ItemPager available is not left set to false | alice | kv_engine | Status: MERGED | +2 | +1 |
143136,2 | MB-43055: Cleanup dead code in ItemPager::run | alice | kv_engine | Status: ABANDONED | -1 | -1 |
143175,1 | Merge branch '6.5.2' into couchbase/mad-hatter | mad-hatter | kv_engine | Status: ABANDONED | 0 | 0 |
143183,5 | Merge branch '6.5.2' into couchbase/mad-hatter | mad-hatter | kv_engine | Status: MERGED | +2 | +1 |
143811,1 | Merge branch 'mad-hatter' into master | master | kv_engine | Status: MERGED | +2 | +1 |
171573,3 | Using sdk client pool for epengine test:test_MB_43055 | master | TAF | Status: MERGED | +2 | +1 |
171739,1 | Merge remote-tracking branch 'couchbase/alice' into mad-hatter | mad-hatter | kv_engine | Status: MERGED | +2 | +1 |
178195,1 | Merge branch 'mad-hatter' into cheshire-cat | cheshire-cat | kv_engine | Status: MERGED | +2 | +1 |
178480,1 | Merge branch 'cheshire-cat' into neo | neo | kv_engine | Status: MERGED | +2 | +1 |
178895,1 | Merge commit 'couchbase/neo~7' into trunk | master | kv_engine | Status: MERGED | +2 | +1 |