RES: Is the add command atomic ?

Brian Aker brian at tangent.org
Wed Mar 26 19:51:40 UTC 2008


Hi!

On Mar 26, 2008, at 12:40 PM, Fausto Richetti Blanco wrote:
> I understand what you said about "the small chance it could get  
> ejected". Is there a way to configure memcached to never discard  
> data ? What do you mean by "depending on other factors" ? If the  
> memory available to memcached is guaranteed to have enough space to  
> store all my locks and I do not set expiration on any keys, can  
> memcached still discard some locks ?

Avoid SET operations, and use just add and replace (and if you want to  
get really paranoid CAS).

What is missing right now is a DELETE BY CAS and atomic set/add/ 
replace that return a CAS identifier.

Cheers,
	-Brian

--
_______________________________________________________
Brian "Krow" Aker, brian at tangent.org
Seattle, Washington
http://krow.net/                     <-- Me
http://tangent.org/                <-- Software
_______________________________________________________
You can't grep a dead tree.





More information about the memcached mailing list