Cassandra hard
What is the critical operational danger of setting `gc_grace_seconds` to a very low value (e.g., 1 hour) in a cross-datacenter Cassandra cluster?
- A The cluster will run out of JVM heap space and enter a constant GC loop.
- B Data Resurrection: If a node is down for 2 hours (longer than the grace period), it misses the deletion and its tombstones are purged on the healthy nodes. When it returns, it will treat its 'old' data as valid and replicate it back to the whole cluster.
- C Encryption keys will expire, preventing the database from booting.
- D Cassandra will stop accepting writes until a full backup is performed.
Answer: B. Data Resurrection: If a node is down for 2 hours (longer than the grace period), it misses the deletion and its tombstones are purged on the healthy nodes. When it returns, it will treat its 'old' data as valid and replicate it back to the whole cluster.
Tombstones must persist long enough to ensure `nodetool repair` has a chance to run on every node. If a tombstone is deleted before an offline node learns about it, that node will eventually 're-share' the deleted data as if it were brand new. The default is 10 days (864,000 seconds) for a reason.
One system design question a day, with spaced repetition so the ones you miss come back.
Get the appRelated questions
- In a Cassandra Keyspace, what does a 'Replication Factor of 3' specifically guarantee for your data redundancy?
- Unlike a Leader-Follower architecture (like MySQL or Redis), how does Cassandra maintain high availability within its node cluster?
- Cassandra Query Language (CQL) looks similar to SQL. What is a fundamental SQL feature that CQL does NOT support to ensure distributed performance?
- What is the critical architectural function of the 'Partition Key' in a Cassandra table?
- Apache Cassandra is fundamentally designed as which architectural category of NoSQL database?
- An extreme financial trading application requires 'Batch' sync for the Commit Log. What is the fundamental throughput limitation introduced by this setting?