[SPY-124] append/incr/decr/add/replace should not require CAS value to be passed Created: 21/Jun/12  Updated: 04/Jun/13  Resolved: 04/Jun/13

Status: Resolved
Project: Spymemcached Java Client
Component/s: library
Affects Version/s: None
Fix Version/s: 2.9.0
Security Level: Public

Type: Improvement Priority: Critical
Reporter: Perry Krug Assignee: Michael Nitschinger
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
is duplicated by JCBC-143 Prepend should not require CAS Resolved

In the current implementation, there is no method for a non-CAS version of the append/prepend/incr/decr/add/replace operations. As per the memcached protocol, these operations do not require (but may be used with) a CAS id and requiring one greatly reduces the performance available by requiring a gets prior to the operation.


Comment by Raghavan Srinivas (Inactive) [ 22/Aug/12 ]
The incr, decr, add and replace do have calls that do not require CAS Id. For the append and prepend methods

you could do something like this

     c.prepend(0, "prepend-key", "value");

which would not require a CAS to be supplied/fetched. Will this suffice for now?

My suggestion would be to close this issue and open a separate issue for just append and prepend if it's still deemed a bug.

Comment by Michael Nitschinger [ 21/Dec/12 ]
Comment by Perry Krug [ 21/Dec/12 ]
This will need a docs update as well...
Comment by Perry Krug [ 06/Feb/13 ]
Michael, just to add here, I think it would be sufficient to document this rather than changing the API itself. Documenting that you can (and should!) pass 0 for the CAS value when using these operations.
Generated at Sat Oct 25 18:03:54 CDT 2014 using JIRA 5.2.4#845-sha1:c9f4cc41abe72fb236945343a1f485c2c844dac9.