CAS is broken

Tomash Brechko tomash.brechko at gmail.com
Mon Nov 12 06:51:06 UTC 2007


On Sun, Nov 11, 2007 at 22:46:23 -0800, Chris Goffinet wrote:
> The mutex part is handled right now using the threads code, every item  
> allocation has a mutex around it, so this should be safe by calling  
> inside the item_allocation.
> 
> Right now every item does have its own cas id. If you propose the  
> following scenario:
> 
> set foo -> id 0
> gets foo -> id 0
> delete foo
> set foo -> id 0
> cas foo -> sent using 0
> 
> That would succeed when it should of failed. The second set should of  
> caused it to be 1.

Good point, understood.


-- 
   Tomash Brechko


More information about the memcached mailing list