Scrivio Interview library
DebuggingIntermediate6 min read · updated 13 November 2026

A Cassandra node in a six-node cluster with replication factor 3 was down for six hours after a disk failure. It was restarted, and services that read and write at consistency level ONE returned stale and missing data for some customers over the following day.

Why did the node come back with gaps, why did ONE expose them, and what should the restart procedure and consistency settings have been?

Hints are kept only for max_hint_window, three hours by default, so the writes from the last three hours of the six-hour outage were never handed off, and the node rejoined without them. A read at ONE can be answered by that node alone, which returns old or missing values, and read repair does nothing because a ONE read compares no replicas. The node should have been repaired (nodetool repair) before serving clients, for example with the native transport disabled until repair finished, and data where staleness matters should use LOCAL_QUORUM; a node down longer than gc_grace_seconds must never rejoin as it is, but be wiped and rebuilt.

Background to this question

A disk fails, the node is replaced or fixed, it comes back, and everything looks green. Then for a day customers see old or missing data. This debugging question is popular because it ties together hints, repair, consistency levels and tombstones, and the correct restart procedure is something every Cassandra operator should know. In this answer, we will recap how replicas catch up after downtime, explain the gap in this incident, see why ONE exposed it, and then write the restart procedure and consistency settings that would have prevented it.

1A Quick Recap: How a Returning Node Catches Up

With replication factor 3, each piece of data lives on three nodes. While one node is down, writes still succeed on the other two, and coordinators store hints, small records of the mutations the down node missed. When it returns, coordinators replay those hints to it. For anything hints did not cover, there are two other mechanisms: read repair, which fixes values a read happens to compare, and anti-entropy repair, run with nodetool repair, which compares whole ranges between replicas using Merkle trees and streams the differences.

2Why the Node Came Back With Gaps

Coordinators keep writing hints only for max_hint_window, three hours by default. After the node had been down for three hours, coordinators stopped storing hints for it. So when it returned after six hours, it received the first three hours of missed writes through hint replay, and nothing for the last three hours. Those writes existed on the other two replicas, but not on this node.

Notice that nothing reports this as an error. The node starts, gossip marks it up, and it begins serving reads. Its data is simply three hours old for every partition written during that period.

Step throughSix hours down with a three-hour hint window
  1. Disk fails at 08:00node marked down; other replicas take writes
  2. 08:00 to 11:00coordinators store hints for the node
  3. 11:00 to 14:00hint window exceeded: no hints stored
  4. Node restarts at 14:00hints replayed: only 08:00 to 11:00
  5. Repaired before serving reads?
    YesNode is consistent, then servesNoServes reads with a three-hour gap

5 steps in order. Play them, or step through them one at a time.

3Why ONE Exposed the Gap

At consistency level ONE, the coordinator sends the read to one replica, usually the one with the best recent latency, and returns whatever it answers. If that replica is the returning node, the reader gets the old value, or no row at all if the partition was created during the gap. There is nothing to compare against, so read repair does not run. That is why the incident lasted a day: each read had a one-in-three chance or so of landing on the stale node, and nothing fixed the data as a side effect.

Writes at ONE made things worse in a different way. During the outage, a write at ONE needed only one replica to succeed, so some writes may have landed on just one of the two remaining nodes, leaving even fewer good copies.

4The Restart Procedure That Should Have Been Used

The rule is simple: a node that was down longer than the hint window must be repaired before it serves clients. We can start it without the client protocol, so it joins the ring, receives writes and takes part in repair, but no client connects to it as a coordinator. There is a catch: this only stops the node from coordinating. Other coordinators can still choose it as the one replica for a read at ONE, so while it is being repaired, reads of this data should run at LOCAL_QUORUM, or the node should be replaced instead, which streams all its data before it takes any reads.

Text
# cassandra.yaml on the returning node (or -Dcassandra.start_native_transport=false)
start_native_transport: false
nodetool status # UN 10.0.3.14 ... node is up and normal in the ring
nodetool repair -full billing # full repair of all ranges this node replicates
# ... Repair completed successfully
nodetool enablebinary # now accept client connections

After a full repair, every range on this node has been compared with its other replicas and the missing three hours streamed in. Operations runbooks often go further and say that if the node was down for hours and repair would take long, it is cleaner to replace it: start a new node with replace_address_first_boot pointing at the old one, which streams all its data from the other replicas before it serves anything.

5Consistency Settings for Data Where Staleness Matters

Repair after the outage closes the gap, but the consistency level decides whether a stale replica can ever reach a user. With LOCAL_QUORUM for both reads and writes, a write needs two of the three replicas in the local data center, and a read asks two and returns the newest value. Since 2 + 2 > 3, every read overlaps every successful write, so one stale replica is outvoted, and the read also repairs it. The cost is a little more latency, the slower of two replicas instead of the fastest one, and requests fail if two of three replicas are down. For customer-facing data where staleness causes real harm, that is the right trade; ONE can remain for data such as recommendations where old values are harmless.

6The Rule for Very Long Outages

There is a stricter limit than the hint window. When data is deleted, Cassandra writes a tombstone, which is kept for gc_grace_seconds, ten days by default, and then purged. If a node was down longer than that, it may still hold values whose tombstones have already been purged on the other replicas. Repairing it would then copy those deleted values back to everyone, and deleted data would reappear. So a node that was away longer than gc_grace_seconds must never rejoin as it is: wipe its data and rebuild it from the other replicas, as a replacement node.

7Follow-up questions

Why not just raise max_hint_window to a day?

Hints for a day of writes can be very large, they are stored on the coordinators and replayed in one burst, and they are lost if a coordinator fails. A longer window helps a little, but repair is the reliable mechanism; hints are a fast path for short outages.

Would QUORUM reads alone have hidden the problem?

Yes for reads: two replicas answer, the good one has the newer timestamp, it wins, and read repair fixes the stale one. But writes at ONE during the outage might have reached only one replica, so both reads and writes should use LOCAL_QUORUM for this data.

How do you know whether a node needs repair before serving?

Compare its downtime with max_hint_window and check whether hints were dropped; Cassandra logs and metrics show hints that were not stored. If in doubt, repair: it is cheaper than a day of stale reads.

8Conclusion

In this answer, we saw that hints cover only max_hint_window, so a node down for six hours returned without the last three hours of writes. Reads at ONE could be served by that node alone and compared nothing, so the gap reached users and was not repaired by reading. The fix is to repair a node before it serves clients whenever it was down longer than the hint window, to use LOCAL_QUORUM for data where staleness matters, and never to bring back a node that was away longer than gc_grace_seconds without wiping and rebuilding it.

What to say in the interviewAbout 90 seconds aloud

Open with

The node came back with a gap because hinted handoff is time-limited. While it was down, coordinators stored hints for it, but only for max_hint_window, which is three hours by default.

Then, if they want more

The outage was six hours, so the last three hours of writes were never hinted, and when the node returned it replayed the first three hours and silently missed the rest. It still joined the ring and served reads. Consistency level ONE exposed this because a ONE read can be answered by a single replica.

If that was the returning node, the client got an old value or nothing, and since there is no second replica to compare, read repair never runs, so the problem persisted for a day.

The correct procedure is: if a node was down longer than the hint window, start it with the native transport disabled, run a full nodetool repair of its ranges, and only then enable client traffic, or replace the node so it streams fresh data.

For data where staleness matters, I would read and write at LOCAL_QUORUM: with three replicas per data center, two must agree, so one stale replica is outvoted and repaired on read. And there is a hard rule for longer outages: if a node was down longer than gc_grace_seconds, ten days by default, never bring it back as it is. Wipe and rebuild it, otherwise deleted data can come back.

About this answer

Last updated
13 November 2026
Checked
Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the official documentation for the version you use. What the checks cover
Where the question comes from
Written by Scrivio for practice. It is not taken from an interview.
Report an issue with this answer

Copy the line below and send it to the author with what you found. It carries the address of this page.

Issue with "Why did the node come back with gaps, why did ONE expose them, and what should the...": https://scrivio-interview-library.netlify.app/architecture/partitioning-and-replication/bfaa7cf5d0/