Comment #4 on issue 151 by tru64ufs: Append/Prepend to existing key whose value that grows larger than 1MB and non-existing key returns NOT_STORED error
http://code.google.com/p/memcached/issues/detail?id=151

Dormando.

Here's what I am trying to do.

Workload: many append/prened(), a few read

1. append against non-existing key (allowed) - error ignored. no need to check its existence
     we only create key on DB read operation.
We are trying not to create too many keys so there are many append operations to simplify logic

2. But once a key had been created, and unless there is another get() operation, we only append. since there are so many appends (append against non-existing key and existing keys), we cannot do
    get() on every append() NOT_STORED failure.
    Again, NOT_STORED failure is ok for non-exsiting key.

3. Values only gets trims on get().

The problem with this is that once a key has been created, and workload requires lots of append and few get, when we get NOT_STORED, we do not know if this append() failure was due to non-exsiting key or out-of-memory. Since there is no need to check for existence when the key does not exist, we cannot add get() after each append() failure. If you do, you are simply adding 1 RTT to each append operation which doubles response time. Could be much worse if the value is large (close to 1M)

Memcached does NOT remove the item when it fails to append/prepend with out-of-mem error. It simply returns NOT_STORED.

Thank you, Dormando.


Reply via email to