cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian ONeill (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-8335) Support CAS with UPDATE...IF col=val OR NOT EXISTS
Date Tue, 18 Nov 2014 20:25:36 GMT


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:
>             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

View raw message