[ 
https://issues.apache.org/jira/browse/CASSANDRA-48?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12695475#action_12695475
 ] 

Jun Rao commented on CASSANDRA-48:
----------------------------------

Here is a contrived but simple example. Suppose that some shopping cart info is 
stored in a column and multiple clients are updating it. A client may want to 
update the column value only if the value hasn't changed since he last read it. 
If the column value has indeed changed, he wants to read the latest value back 
and MERGE it with the local value he has and then reinsert. This will be hard 
to do with the current test-and-set insert semantic.

> test-and-set
> ------------
>
>                 Key: CASSANDRA-48
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-48
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Jonathan Ellis
>
> Atomic test-and-set insert operation would be nice: "set value to X but only 
> if the current value is still Y."  This allows a sort of optimistic 
> consistency: perform a GET, then perform test-and-set with the value of that 
> GET as Y.
> I do not think that this requires strong consistency to be useful.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to