[
https://issues.apache.org/jira/browse/CASSANDRA-20477?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
David Capwell updated CASSANDRA-20477:
--------------------------------------
Status: Ready to Commit (was: Review In Progress)
+1 from Ariel
> Add support in CAS for -= on numeric types, and fixed improper handling of
> empty bytes which lead to NPE
> --------------------------------------------------------------------------------------------------------
>
> Key: CASSANDRA-20477
> URL: https://issues.apache.org/jira/browse/CASSANDRA-20477
> Project: Apache Cassandra
> Issue Type: New Feature
> Components: Feature/Lightweight Transactions, Test/fuzz
> Reporter: David Capwell
> Assignee: David Capwell
> Priority: Normal
> Fix For: 5.x
>
> Time Spent: 3h 40m
> Remaining Estimate: 0h
>
> CAS supports += on numeric types but -= was only supported for counters!
> Should add support so this logic is symmetrical.
> Existing += logic would also generate a NPE if you wrote to a row with empty
> bytes or you try to increment using empty bytes.
> {code}
> ERROR [node1_Native-Transport-Requests-1] node1 2025-03-21 15:29:01,882
> ErrorMessage.java:457 - Unexpected exception during request
> java.lang.NullPointerException: null
> at
> org.apache.cassandra.db.marshal.IntegerType.toBigInteger(IntegerType.java:520)
> at org.apache.cassandra.db.marshal.IntegerType.add(IntegerType.java:525)
> at
> org.apache.cassandra.cql3.terms.Constants$Adder.execute(Constants.java:496)
> {code}
> In making these changes we should also update the existing AST Harry model to
> support CAS operations.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]