Cassandra medium
A Read request with `Consistency Level: QUORUM` reaches the Coordinator. It receives an 'old' version of a row from Node A and a 'newer' version (higher timestamp) from Node B. What occurs next?
- A The Coordinator returns an error to the client and triggers a node replacement for Node A.
- B Read Repair: The Coordinator returns the 'new' version to the client and immediately (or asynchronously) sends a write to Node A to bring it up to date.
- C The Coordinator averages the values of the two rows and returns the result.
- D The query fails because consistency could not be established without Node C.
Answer: B. Read Repair: The Coordinator returns the 'new' version to the client and immediately (or asynchronously) sends a write to Node A to bring it up to date.
Read Repair is Cassandra's 'Self-Healing' mechanism. It uses the work of a Read to fix anomalies detected across replicas. Note that 'Read Repair' only happens on the data it actually touched during the query; it is not a substitute for full background repair.
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?