Question about TTL & tombstones


the documenation Time to Live (TTL) and Compaction | ScyllaDB Docs states “If the data time stamp + gc_grace_seconds is less than or equal to the current time (now), the data is thrown away and a tombstone is not created.”.

So basically the Cassandra fix [CASSANDRA-4917] Optimize tombstone creation for ExpiringColumns - ASF JIRA is already included in Scylla?

So this means I will not have any tombstones if I do the following?

  • Write row without TTL
  • Overwrite existing record with TTL of 10 days (basically a app-level delete)

This way I could track my deletes and write a range tombstone if I find many of my own app-level deletes.

Sorry for asking, but I was not able to find the TTL logic in the Scylla codebase.


Yes, that is correct. Expired cells do not necessarily create a tombstone upon expiry, only in the case where the expiry was less than gc grace period.
See this commit:

Thanks for the confirmation. Also thanks for the commit, I was already looking for the code :slight_smile: