diff options
author | Jean-Francois BUSTARRET <jfbustarret@wat.tv> | 2007-10-03 20:03:55 +0000 |
---|---|---|
committer | Jean-Francois BUSTARRET <jfbustarret@wat.tv> | 2007-10-03 20:03:55 +0000 |
commit | 505bf15af117653e2e4e790a6ebeffaeab5bc967 (patch) | |
tree | b2aa0bbdd62a00ec38c9ba158c79710af65dc6c2 | |
parent | fc2e8effbb555e853bb71bdc0d01525a5a9dbfe3 (diff) | |
download | memcached-505bf15af117653e2e4e790a6ebeffaeab5bc967.tar.gz |
Fix for stats.evictions not incrementing when exptime == 0 items
are kicked off the cache from Jean-Francois BUSTARRET
<jfbustarret@wat.tv>.
git-svn-id: http://code.sixapart.com/svn/memcached/trunk/server@616 b0b603af-a30f-0410-a34e-baf09ae79d0b
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | items.c | 2 |
2 files changed, 5 insertions, 1 deletions
@@ -5,6 +5,10 @@ change allows you to do atomic changes to an existing key. + * Fix for stats.evictions not incrementing + when exptime == 0 items are kicked off the cache. + from Jean-Francois BUSTARRET <jfbustarret@wat.tv>. + 2007-08-21 Paul Lindner <lindner@inuus.com> * Incorporate incrememnt patch from Evan Miller <emiller@imvu.com> to define increment overflow @@ -104,7 +104,7 @@ item *do_item_alloc(char *key, const size_t nkey, const int flags, const rel_tim for (search = tails[id]; tries > 0 && search != NULL; tries--, search=search->prev) { if (search->refcount == 0) { - if (search->exptime > current_time) { + if (search->exptime == 0 || search->exptime > current_time) { STATS_LOCK(); stats.evictions++; STATS_UNLOCK(); |