[
https://issues.apache.org/jira/browse/CASSANDRA-6069?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sylvain Lebresne updated CASSANDRA-6069:
----------------------------------------
Attachment: 6069.txt
This is a bit annoying. When we insert a new collection value, we also insert a
range tombstone to remove the potential previous value. That range tombstone
has a tombstone of t-1 (where t is the timestamp of the actual insert) so it
doesn't conflict with the new inserts. But a CAS write rewrites all the
timestamps to make sure they match the order decided by Paxos, which in this
case mean the range tombstone ends up removing the data we're inserting.
Attaching a patch that implements a simple solution by making paxos use t-1 for
row and range tombstones when rewriting the operation timestamp. In general
this should be ok since tombstones wins over normal inserts so the tombstone
will still always delete anything that has a timestamp < t. It does mean
however that if someone does a row/range deletion and inserts in the same CAS
operation, the deletions won't win contrarly to what happens with other
operations. That being said:
# deleting something you are just inserting is a bit of an anti-social thing to
do.
# I don't think users can actually do it today with CAS because we don't allow
batches.
So feels like a reasonable fix.
The other solution would be to special case the paxos code for that specific
CQL3 collections case, but that's going to be a tad more painful.
> Sets not stored by INSERT with IF NOT EXISTS
> --------------------------------------------
>
> Key: CASSANDRA-6069
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6069
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Reporter: Eric Evans
> Assignee: Sylvain Lebresne
> Fix For: 2.0.1
>
> Attachments: 6069.txt
>
>
> An {{INSERT}} of a {{set}} column type is not stored when using {{IF NOT
> EXISTS}}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira