diff options
author | dormando <dormando@rydia.net> | 2015-01-01 23:48:28 -0800 |
---|---|---|
committer | dormando <dormando@rydia.net> | 2015-01-01 23:48:28 -0800 |
commit | 90593dca21bff56c17916497523273c0a5872a2a (patch) | |
tree | 728a3d3081d94872805fa0ccd72ac710d958c4c7 /items.h | |
parent | 69d1c69997660e79755480b4e4085691ad45911e (diff) | |
download | memcached-90593dca21bff56c17916497523273c0a5872a2a.tar.gz |
flush_all was not thread safe.
Unfortunately if you disable CAS, all items set in the same second as a
flush_all will immediately expire. This is the old (2006ish) behavior.
However, if CAS is enabled (as is the default), it will still be more or less
exact.
The locking issue is that if the LRU lock is held, you may not be able to
modify an item if the item lock is also held. This means that some items may
not be flushed if locking is done correctly.
In the current code, it could lead to corruption as an item could be locked
and in use while the expunging is happening.
Diffstat (limited to 'items.h')
-rw-r--r-- | items.h | 1 |
1 files changed, 0 insertions, 1 deletions
@@ -20,7 +20,6 @@ void do_item_stats(ADD_STAT add_stats, void *c); void do_item_stats_totals(ADD_STAT add_stats, void *c); /*@null@*/ void do_item_stats_sizes(ADD_STAT add_stats, void *c); -void do_item_flush_expired(void); item *do_item_get(const char *key, const size_t nkey, const uint32_t hv); item *do_item_touch(const char *key, const size_t nkey, uint32_t exptime, const uint32_t hv); |