Cassandra hard
Cassandra supports 'Atomic Batches'. If a Batch write to 3 different tables is successful, what is the 'Isolation' guarantee for a concurrent Read query?
- A Full ACID Isolation: A reader will either see all 3 changes or none of them.
- B No Isolation: Even though the batch is 'Atomic' (eventually all are applied), a reader might see the update to Table 1 but not yet Table 2 during the narrow window of replication.
- C Hierarchical Isolation: Table 1 must be read before Table 2.
- D Read-Only Isolation: The tables are locked for reading during the batch update.
Answer: B. No Isolation: Even though the batch is 'Atomic' (eventually all are applied), a reader might see the update to Table 1 but not yet Table 2 during the narrow window of replication.
This is a common misconception. Cassandra Batches provide 'Atomicity' (all will be written via the Batchlog) but NOT 'Isolation'. Unlike a relational DB, there is no global transaction lock. Readers can see partial progress of a batch. To achieve isolation, you would need to use LWT, which is significantly slower.
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?