Distributed systemsanti-entropyhinted handoff

Read repair

Definition

Read repair is a convergence mechanism in leaderless replication where a read that contacts several replicas compares their versions and sends the newest one to any replica that returned an older value.

In practice

In Dynamo-style stores a write may reach only some replicas, for example 2 of 3. When a later quorum read sees mismatched versions, it returns the newest to the client and repairs the laggard in the background, so frequently read keys heal quickly without a separate process.

Read repair only fixes keys that are read; rarely read data can stay divergent indefinitely. That is why it is paired with anti-entropy (replicas comparing Merkle trees and exchanging differences) and hinted handoff. It also adds write work to the read path, so some systems repair only a fraction of reads.

Example

A read with R=2 gets version 7 from replica A and version 6 from replica B; the client receives version 7 and the coordinator writes version 7 to B.