diff options
author | dormando <dormando@rydia.net> | 2017-12-13 17:53:31 -0800 |
---|---|---|
committer | dormando <dormando@rydia.net> | 2017-12-13 17:53:31 -0800 |
commit | a986316d2b2f9a5aef123703b20ac9dbdba78a9f (patch) | |
tree | 408f5bf2de6b7ccfb42fd7bff0c7904f3c22488a /items.c | |
parent | 95246f7947e9d95969d04db0898a93ef66235fb0 (diff) | |
download | memcached-a986316d2b2f9a5aef123703b20ac9dbdba78a9f.tar.gz |
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.
Diffstat (limited to 'items.c')
-rw-r--r-- | items.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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) { |