ARC: Evicted entries from T1 are not tracked in the ghost list
erwanor opened this issue · 1 comments
erwanor commented
gc := gcache2.New(10).ARC().Build()
for i := 0; i <= 10; i++ {
value := fmt.Sprintf("val%d", i)
gc.Set(i, value)
}
Upon inspection of the cache internal state, it appears that:
- As expected, all the key/values are stored in the tier 1 cache
t1
- The key
0
with valueval0
is correctly evicted fromt1
However, the ghost list b1
does not keep track of the evicted key 0
.
See: ARC: A Self-Tuning, Low Overhead Replacement Cache - https://www.usenix.org/legacy/events/fast03/tech/full_papers/megiddo/megiddo.pdf
erwanor commented
The issue will be considered fixed when a unit-test addressing it hits master.