CAS patches

Dustin Sallings dustin at spy.net
Fri Nov 16 06:59:04 UTC 2007


	There is a problem with trunk's CAS ID allocation where it doesn't  
allocate a new ID after a CAS.

	This means that it would correctly validate the CAS ID on save, but  
not create a new one, so the previous CAS ID could be replayed  
indefinitely (which means that if n clients try an update at the same  
time, they'll all succeed).

	I've attached two diffs:

	1)  A test case that shows it allowing CAS replay.
	2)  A fix for #1.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: cas-fix.diff
Type: application/octet-stream
Size: 778 bytes
Desc: not available
Url : http://lists.danga.com/pipermail/memcached/attachments/20071115/678b23e1/cas-fix.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cas-test.diff
Type: application/octet-stream
Size: 873 bytes
Desc: not available
Url : http://lists.danga.com/pipermail/memcached/attachments/20071115/678b23e1/cas-test.obj
-------------- next part --------------


-- 
Dustin Sallings





More information about the memcached mailing list