embarassing bug in perl module

Brad Fitzpatrick brad@danga.com
Tue, 3 Feb 2004 10:58:36 -0800 (PST)


I just found and fixed (in cvs) an embarassing bug in Cache::Memcached 0.11
related to get_multi.

If a 2k read boundary came in the middle of an item header, all subsequent
items were ignored.  It wasn't always like this, but we missed it during
the later parser changes.  (a test suite would be nice.... :/)

So your memcached server stats would report high hit rates, but the Perl
module would just throw stuff away.

This bug was a lot easier to hit with a large get_multi query with a mix
of large items and small items.   (large enough to roll over into multiple
2k regions, but a lot of small items so the headers were longer than the
data and the boundary was likely to be within a header....)

I'll be putting up a new release once Avva confirms my fix.  (which is now
live on LiveJournal and seems to be kicking ass...)

I like parens.  (too much coffee)

- Brad