What are the semantics of flush_all with delay
Elizabeth Mattijsen
liz at dijkmat.nl
Mon Apr 2 20:31:49 UTC 2007
At 1:24 PM -0700 4/2/07, Dustin Sallings wrote:
> I was writing a test suite for my java client that talked to
>an actual memcached and found that I couldn't figure out exactly
>what flush_all with a delay is supposed to do.
>
> My test for delete works something like this:
>
> validate object isn't there
> set object
> validate object is there with my value
> delete(5)
> validate object isn't there
> validate add does not set object
> validate update does not set object
> validate set works fine
>
> I tried the same thing for flush_all, and the assertions
>following the delayed flush don't seem to make much sense.
>
> I was running my tests against memcached 1.2.1 in case it
>makes a difference.
The intent of flush_all with a delay, was that in a setting where you
have a pool of memcached servers, and you need to flush all content,
you have the option of not resetting all memcached servers at the
same time (which could e.g. cause a spike in database load with all
clients suddenly needing to recreate content that would otherwise
have been found in the memcached daemon).
The delay option allows you to have them reset in e.g. 10 second
intervals (by passing 0 to the first, 10 to the second, 20 to the
third, etc. etc.).
Hope this makes sense.
Liz
More information about the memcached
mailing list