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:17:00 UTC

[jira] [Commented] (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:comment-tabpanel&focusedCommentId=17254059#comment-17254059 ] 

Konstantin commented on CASSANDRA-16368:
----------------------------------------

See also https://issues.apache.org/jira/browse/CASSANDRA-13203

> 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 of node-local timestamp may lead to duplicate and non-monotonic timestamp values. 
>  This leads to loss of LWT linearizability.
>  The issue is reproducible with a Jepsen test for list append, prepend in presence of time and topology nemeses.
> Relevant links: [https://github.com/scylladb/scylla/issues/7116]
> {{Code generating an independent timestamp is in [https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/cql3/Lists.java#L499]}}
> {\{ ByteBuffer uuid = ByteBuffer.wrap(UUIDGen.getTimeUUIDBytes());}}
>  \{{ params.addCell(column, CellPath.create(uuid), buffer);}}
>  
> A related problem is that this approach ignores user-supplied statement timestamps. 



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