You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Konstantin (Jira)" <ji...@apache.org> on 2020/12/23 12:09:00 UTC

[jira] [Updated] (CASSANDRA-16368) Lightweight transaction linearizability violations when using list append and prepend operations

     [ https://issues.apache.org/jira/browse/CASSANDRA-16368?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Konstantin updated CASSANDRA-16368:
-----------------------------------
    Description: 
This is an equivalent of https://github.com/scylladb/scylla/issues/7611

Cassandra's "list" type is a CRDT which allows a write-only "append" operation, not requiring a read. This is implemented by using the current time on the coordinator node as the key of the new item, so that a second append operation will put the new item after the item from the first append operation. 

However, in case of lightweight transactions, uncoordinated use use of node-local timestamp may lead to duplicate and non-monotonic timestamp values. 
If an append is done using an LWT statement, this leads to loss of LWT linearizability.
The issue is reproducible with Jepsen test for list append, prepend in presence of time and topology nemeses. 

Relevant links: https://github.com/scylladb/scylla/issues/7116


  was:Cassandra list append and prepend operations use a custom clock


> Lightweight transaction linearizability violations when using list append and prepend operations
> ------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-16368
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-16368
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Consistency/Coordination, Feature/Lightweight Transactions
>            Reporter: Konstantin
>            Priority: Normal
>
> This is an equivalent of https://github.com/scylladb/scylla/issues/7611
> Cassandra's "list" type is a CRDT which allows a write-only "append" operation, not requiring a read. This is implemented by using the current time on the coordinator node as the key of the new item, so that a second append operation will put the new item after the item from the first append operation. 
> However, in case of lightweight transactions, uncoordinated use use of node-local timestamp may lead to duplicate and non-monotonic timestamp values. 
> If an append is done using an LWT statement, this leads to loss of LWT linearizability.
> The issue is reproducible with Jepsen test for list append, prepend in presence of time and topology nemeses. 
> Relevant links: https://github.com/scylladb/scylla/issues/7116



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org