CAS is broken
tomash.brechko at gmail.com
Mon Nov 12 07:42:15 UTC 2007
On Sun, Nov 11, 2007 at 23:35:55 -0800, Dustin Sallings wrote:
> An object isn't reused during a write. A new item is allocated when
> you begin a set. The old one is served out until the new write is
> finished (at which point the old one is added back to the free pool).
> I wasn't as worried about the thread synchronization because
> a) The abstraction makes it trivial to add a mutex if necessary.
> b) It's likely already in a mutex (although I didn't check)
Yes, I already understood my mistake. CAS counter should be global,
and no fast path is possible in the client as I thought at first.
More information about the memcached