[
https://issues.apache.org/jira/browse/CASSANDRA-8335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14216736#comment-14216736
]
Brian ONeill commented on CASSANDRA-8335:
-----------------------------------------
Our use case:
We do in-memory dimensional aggregations that we want to write to C* using LWT.
(so, it’s a low-volume of writes: aggregations across time windows)
On “commit”, we:
1) Read current value for time window
(which returns null if not exists for time window, or current_value if
exists)
2) Then we need to UPSERT new_value for window
where new_value = current_value + agg_value
updating iff no other node has inserted/updated the value
For (2), we would love to see:
UPSERT value=new_value where (not exists || value=read_value)
> Support CAS with UPDATE...IF col=val OR NOT EXISTS
> --------------------------------------------------
>
> Key: CASSANDRA-8335
> URL: https://issues.apache.org/jira/browse/CASSANDRA-8335
> Project: Cassandra
> Issue Type: New Feature
> Components: Core
> Reporter: Robert Stupp
> Priority: Minor
> Labels: cas, cql
>
> On the -dev mailing list the RFE to extend UPDATE LWT using something like
> {{UPDATE ... IF col=val ... OR NOT EXISTS}}
> RFE is to add the {{OR NOT EXISTS}} which means either the the {{IF}}
> conditions are met *xor* the row does not exist.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)