You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Chris Lohfink (Jira)" <ji...@apache.org> on 2025/07/08 15:48:00 UTC

[jira] [Commented] (CASSANDRA-9420) Table option for promising that you will never touch a column twice

    [ https://issues.apache.org/jira/browse/CASSANDRA-9420?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18003839#comment-18003839 ] 

Chris Lohfink commented on CASSANDRA-9420:
------------------------------------------

kinda from 9779, but would this be appropriate ticket to discuss adding a "no_deletes" or "append_only" table option for the more aggressive optimizations? I think a `no_deletes` option would be easier to enforce where a append_only would really be an unenforcable hint but provides more optimizations across multiple places

> Table option for promising that you will never touch a column twice
> -------------------------------------------------------------------
>
>                 Key: CASSANDRA-9420
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-9420
>             Project: Apache Cassandra
>          Issue Type: New Feature
>          Components: Local/Compaction, Local/Config
>            Reporter: Björn Hegerfors
>            Priority: Normal
>
> There are time series use cases where you write all values with various TTLs, have GC grace = 0 and never ever update or delete a column after insertion. In the case where all TTLs are the same, DTCS with recent patches works great. But when there is lots of variations in TTLs, you are forced to choose between splitting your table into multiple TTL tiers or having your SSTables filled to the majority with tombstones. Or running frequent major compactions.
> The problem stems from the fact that Cassandra plays safe when a TTL has expired, and turns it into a tombstone, rather than getting rid of it on the spot. The reason is that this TTL _may_ have been in a column which has had an earlier write without (or with a higher) TTL. And then that one should now be deleted too.
> I propose that there should be table level setting to say "I guarantee that there will never be any updates to any columns". The effect of enabling that option is that all tombstones and expired TTLs should always be immediately removed during compaction. And the check for dropping entirely expired SSTables can be very loosened for these tables.
> This option should probably require gc_grace_seconds to be set to zero. It's also questionable if writes without TTL should be allowed to such a table, since those would become constants.



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

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