Database / Apache Cassandra Intermediate and Advanced interview questions
What is read repair in Cassandra?
Read repair fixes inconsistent replicas as a side effect of normal read traffic, rather than waiting for a scheduled repair job.
- When a coordinator queries multiple replicas to satisfy the consistency level, it compares the responses.
- If the replicas disagree, the coordinator identifies the most recent value (by timestamp) and sends it to the out-of-date replicas.
- Modern Cassandra performs this automatically for any read that touches more than one replica, correcting divergence discovered along the way.
There is also full read repair, historically tunable via a per-table read_repair_chance, which queried additional replicas beyond what the consistency level required purely to catch inconsistencies at a low background probability. That knob has been deprecated/removed in newer versions in favor of always reconciling whatever replicas were already contacted.
Read repair is a helpful complement to scheduled anti-entropy repair, but it's opportunistic: it only fixes divergence for rows that are actually read. Cold data that's rarely queried can still drift and needs periodic nodetool repair to stay in sync.
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...
