Comment #3 on issue 151 by [email protected]: 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
Are you trying to ensure that the key doesn't go over 1MB, or that you append against something that already exists?
Memcached removes the item if it fails to append to it, so your best bet is to actually run 'add' if append fails for any reason. If the 'add' fails you then lost the race for recreating the item and you can decide to either run append again (depending on what your app is doing here...) or give up.
I never noticed the issue here since we already use the append/add routine.
