File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -1641,7 +1641,16 @@ typename CacheAllocator<CacheTrait>::WriteHandle
16411641CacheAllocator<CacheTrait>::tryEvictToNextMemoryTier(
16421642 TierId tid, PoolId pid, Item& item) {
16431643 if (item.isChainedItem ()) return {}; // TODO: We do not support ChainedItem yet
1644- if (item.isExpired ()) return acquire (&item);
1644+ if (item.isExpired ()) {
1645+ auto handle = accessContainer_->removeIf (item,
1646+ [](const Item& it) {
1647+ return it.getRefCount () == 0 ;
1648+ });
1649+ if (handle) {
1650+ removeFromMMContainer (item);
1651+ }
1652+ return handle;
1653+ }
16451654
16461655 TierId nextTier = tid; // TODO - calculate this based on some admission policy
16471656 while (++nextTier < getNumTiers ()) { // try to evict down to the next memory tiers
You can’t perform that action at this time.
0 commit comments