October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk3 min

What Happens to Cassandra Reads After a Delete?

Cassandra records deletes as tombstones. Learn why they can add read work, how compaction removes them safely, and how grace periods protect against zombie data.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Deleting data in Apache Cassandra is not an immediate physical erase. Cassandra writes a timestamped tombstone through its normal write path; until compaction can safely remove that marker and the older data it covers, reads may need extra work to reconcile data across SSTables. The impact depends on how the data is laid out, so a delete does not impose the same slowdown on every read.

What Cassandra writes when you delete data

Cassandra’s SSTables are immutable, so a delete does not rewrite an older SSTable in place. Instead, Cassandra records a timestamped deletion marker called a tombstone. During reconciliation, values timestamped before the deletion are ignored. The marker allows replicas to learn that older data must not be returned, even if that data still exists in another SSTable.

As an Amazon Associate I earn from qualifying purchases.

As the Apache Cassandra compaction overview puts it: “Cassandra treats a deletion as an insertion, and inserts a time-stamped deletion marker called a tombstone.”

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Why tombstones can add work to reads

A read may have to consult multiple SSTables because updates and deletes do not immediately consolidate older data. Cassandra reconciles the versions it finds, including tombstones that tell it which values are obsolete. The more duplicate data and SSTables a read must examine, the more work it may involve. Cassandra’s documentation notes that removing tombstones and duplicate data through compaction can make reads faster.

There is no fixed latency penalty per delete. The effect depends on the SSTables involved and the amount of reconciliation required by a particular read; the documentation does not establish a universal slowdown factor.

When compaction can remove tombstones

Compaction merges SSTables, reconciles versions and can remove obsolete data. But it cannot simply discard a tombstone while an older value it covers might still be present elsewhere. The tombstone and the SSTable containing the old value may need to be compacted together so the deletion is applied before the marker is removed.

The grace period is a safety window

The documented default for gc_grace_seconds is 864000 seconds, or ten days. This is a retention window that helps replicas that were unavailable during a delete catch up; it is not a scheduled cleanup time. After the grace period, a tombstone becomes eligible for purging, but compaction and the data-shadowing conditions still determine whether it is safe to remove. Expiration alone does not immediately free disk space.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Why replica recovery and repair matter

If a replica misses a deletion and Cassandra purges its tombstone before that replica recovers and processes the deletion, the replica can later reintroduce the old value. This is commonly called zombie data. The safe grace period depends on the cluster’s failure-recovery and repair practices, so lowering gc_grace_seconds without accounting for them can put deletion correctness at risk. Cassandra documents purge and repaired-data safety settings in its compaction subproperties reference.

TTL expiration follows a similar cleanup path

When a value expires under a TTL, Cassandra turns it into a tombstone rather than immediately removing its physical data. Cleanup can be difficult when related partition data is spread across SSTables. The compaction overview warns that mixing TTL and non-TTL data, or using different TTL lengths, can make tombstones harder to drop.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Choose compaction for the workload, not as a universal fix

Compaction strategy changes the balance between read amplification (the SSTables consulted for a read) and write amplification (the work of rewriting data over its lifetime). Apache Cassandra’s Unified Compaction Strategy guidance describes leveled compaction as suited to read-heavy workloads and tiered compaction as suited to write-heavy workloads. Those are workload-oriented guidelines, not a guarantee that one strategy is best for every cluster.

Rank #4
The New Real Book
  • Used Book in Good Condition
  • For read-heavy workloads, consider the read-amplification tradeoff described for leveled compaction.
  • For write-heavy workloads, consider the write-amplification tradeoff described for tiered compaction.
  • Assess the actual workload and data layout rather than changing compaction strategy solely because deletes are present.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.