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

vincent royer updated CASSANDRA-21067:
--------------------------------------
    Attachment: CASSANDRA-21067_Fixup_PAXOS_substraction.patch

> C* 4.1.10 LWT does not support the substraction 
> ------------------------------------------------
>
>                 Key: CASSANDRA-21067
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-21067
>             Project: Apache Cassandra
>          Issue Type: Bug
>            Reporter: vincent royer
>            Priority: Normal
>         Attachments: CASSANDRA-21067_Fixup_PAXOS_substraction.patch
>
>
> C 4.1 does not support the minus operation in LWT. See below:
> docker run --name cassandra-41 -d cassandra:4.1.10-jammy
> docker exec -it cassandra-41 cqlsh
> cqlsh> create KEYSPACE toto WITH replication = \{'class': 
> 'NetworkTopologyStrategy','datacenter1':'1'};
> cqlsh> use toto;
> cqlsh:toto> create table t1 (pk int primary key, a int);
> cqlsh:toto> insert into t1 (pk, a) VALUES ( 1,1);
> cqlsh:toto> update t1 set a = a + 1 WHERE pk=1;
> cqlsh:toto> update t1 set a = a + 1 WHERE pk=1 IF EXISTS;
>  [applied]
> -----------
>       True
> cqlsh:toto> update t1 set a = a - 1 WHERE pk=1 IF EXISTS;
> InvalidRequest: Error from server: code=2200 [Invalid query] message="Invalid 
> operation (a = a - 1) for non counter column a"
>  
> The code is correct in C 5.x, but C* 4.1 branch probably had a merge issue 
> and does not play any unit test with a substraction in a LWT.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to