Database / Apache Cassandra Intermediate and Advanced interview questions
What are tombstones in Cassandra?
Because Cassandra's SSTables are immutable once written, it cannot simply erase a row or column in place. Instead, a delete writes a tombstone — a special marker recording that a value was deleted, along with a timestamp.
- Tombstones can exist at the cell, row, range, or partition level, depending on what was deleted.
- During reads, tombstones are merged in like any other value and suppress the deleted data so it does not appear in results.
- Tombstones are only physically removed during compaction, and only after
gc_grace_secondshas passed since the delete, giving the cluster time to replicate the delete everywhere via repair.
DELETE FROM orders WHERE order_id = 'abc123'; -- writes a tombstone, doesn't immediately free disk space
If a tombstone were removed too early — before every replica had seen it — a replica that missed the delete could later resurrect the old value during a read or repair. That's precisely why gc_grace_seconds exists as a safety window before permanent removal.
Invest now in Acorns!!! 🚀
Join Acorns and get your $5 bonus!
Acorns is a micro-investing app that automatically invests your "spare change" from daily purchases into diversified, expert-built portfolios of ETFs. It is designed for beginners, allowing you to start investing with as little as $5. The service automates saving and investing. Disclosure: I may receive a referral bonus.
Invest now!!! Get Free equity stock (US, UK only)!
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.
Webull! Receive free stock by signing up using the link: Webull signup.
More Related questions...
