From a986316d2b2f9a5aef123703b20ac9dbdba78a9f Mon Sep 17 00:00:00 2001 From: dormando Date: Wed, 13 Dec 2017 17:53:31 -0800 Subject: extstore: close hole with storage tracking items expired/evicted while pulling from tail weren't being tracked, leading to a leak of object counts in pages. --- items.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'items.c') diff --git a/items.c b/items.c index 5153420..400048b 100644 --- a/items.c +++ b/items.c @@ -1106,6 +1106,7 @@ int lru_pull_tail(const int orig_id, const int cur_lru, itemstats[id].tailrepairs++; search->refcount = 1; /* This will call item_remove -> item_free since refcnt is 1 */ + STORAGE_delete(ext_storage, search); do_item_unlink_nolock(search, hv); item_trylock_unlock(hold_lock); continue; @@ -1121,6 +1122,7 @@ int lru_pull_tail(const int orig_id, const int cur_lru, } /* refcnt 2 -> 1 */ do_item_unlink_nolock(search, hv); + STORAGE_delete(ext_storage, search); /* refcnt 1 -> 0 -> item_free */ do_item_remove(search); item_trylock_unlock(hold_lock); @@ -1186,6 +1188,7 @@ int lru_pull_tail(const int orig_id, const int cur_lru, itemstats[id].evicted_active++; } LOGGER_LOG(NULL, LOG_EVICTIONS, LOGGER_EVICTION, search); + STORAGE_delete(ext_storage, search); do_item_unlink_nolock(search, hv); removed++; if (settings.slab_automove == 2) { -- cgit v1.2.1