All revisions

REVISION / CONSENSUS AND SAFETY

Split brain

Two leaders accept writes. Neither knows the other is lying.

The first revision

A network split separates a former leader from its peers. Clients can still reach both sides, so two processes believe they can accept writes.

Why it gets worse

Leases and timeouts do not stop a paused process from waking late and issuing an old write. If the storage layer cannot distinguish an old leader, stale work can overwrite current state.

Repair options

Give each leader term a monotonically increasing fencing token. Storage rejects writes with an older token. Quorum rules can also prevent a new leader from being elected without enough peers.

Replay

Partition the leader from a replica. Attempt writes through both paths, then reconnect. A safe system rejects stale leadership rather than pretending both histories can be merged without cost.