diff options
author | dormando <dormando@rydia.net> | 2014-10-12 20:21:48 -0700 |
---|---|---|
committer | dormando <dormando@rydia.net> | 2014-10-12 20:21:48 -0700 |
commit | f2a4e5b491ed51780d8f0ce910688a7828a59d24 (patch) | |
tree | a11deadc3ae76b1f6dd6dba61a37493b71db8de7 /items.h | |
parent | 4234cbad76c9a8fdafbfd9d9c044341bf874cbd2 (diff) | |
download | memcached-f2a4e5b491ed51780d8f0ce910688a7828a59d24.tar.gz |
Avoid OOM errors when locked items stuck in tail
If a client fetches a few thousand keys, then does not ever read the socket,
those keys will stay reflocked until the client disconnects or resumes. If
some of those items are unpopular they can drop to the tail, causing all
writes in the slab class to OOM.
This creates some relief by chucking the items back to the head.
Big thanks to Jay Grizzard and other folks at Box for helping narrow this
down.
Diffstat (limited to 'items.h')
-rw-r--r-- | items.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -11,6 +11,7 @@ void do_item_unlink(item *it, const uint32_t hv); void do_item_unlink_nolock(item *it, const uint32_t hv); void do_item_remove(item *it); void do_item_update(item *it); /** update LRU time to current and reposition */ +void do_item_update_nolock(item *it); int do_item_replace(item *it, item *new_it, const uint32_t hv); /*@null@*/ |