Updating cell value to null in Cassandra and avoid tombstones

552 views Asked by At

We are having DSE 6.8 with Cassandra version 3.11 and ysing spring-data-cassandra 2.2.6 which is using cassandra-driver-core 3.7.2

We have use cases where we need to UPDATE a field (cell) value to null (or whatever will represent "no value"), and it was not null before.

The trick here is that we wanted to avoid tombstones when applying this operation.

Thanks.

1

There are 1 answers

0
Alex Ott On BEST ANSWER

It's impossible - in Cassandra, setting value to null is equal to deletion operation that will generate a tombstone. If you want to avoid a tombstone, agree on some artificial value that will represent "no value", like, empty string, 0, etc.