Delete operations

In Cassandra, a delete operation does not delete the requested data immediately. Instead, it puts a marker over the deleted data. This marker is called a tombstone. A tombstone's age is defined by per-column family option gc_grace_seconds. After gc_grace_seconds has passed, Cassandra clears data marked with tombstones, and it clears all tombstones during the compaction of the column family.

Tip

If a node is down for loger than the time specified by gc_grace_seconds and is recovered, there is a chance that the deleted data will come back. To avoid such scenarios, nodes dead for such a long time should be replaced instead of being added back to the cluster.

Get Apache Cassandra Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.