Skip to content

~/lab/faultseed

The client got success. Why is the write gone?

A write, a crash, and an election in FaultSeed. The same seed shows how changing when the leader replies changes what the client can trust.

Deterministic simulation lab · not production

Replay

Step through two recorded runs. Switch rules to compare the same moment in each trace. No cluster runs in your browser.

The step-by-step player needs JavaScript. The full summary and run evidence are below.

What happened

  • Before
    The leader, node-a, returned success for request-19 after only its local durable write. A follower briefly stored the entry, then a delayed append replaced its log with a shorter copy. The leader crashed before it committed the write.
  • Failure
    ACKNOWLEDGED_WRITE_LOST fired at 398 ms when node-b became leader in term 8. The monitor checked the new leader’s log, not a client read: it was missing version 14 for key-9. Expected value-d9b059; the node’s actual committed value was null. The simulator had dispatched 516 scheduler events; the election is trace row #875.
  • After
    The leader now replies only after durable replication to a majority and commit. In the fixed run, node-b still won that election without the entry, but the client was never told that the write succeeded. The original leader later regained leadership and committed the entry. The original request got no reply in the trace.

Run evidence

  • Same inputs
    Seed 1 · 80 operations · fault rate 0.35 · 2,000 ms virtual-time limit
  • Before

    817857d · local acknowledgement · 875 trace entries · invariant failed

    d79a5807920f8ef73bae3bddb43e88597c2a6a37acb53a961731ef3c5dae1308
  • After

    44842f4 · quorum acknowledgement · 1,015 trace entries · no violation

    5ee1c7e8fa3e619fc52f0a95d291ba35eab7fec309c5b75dadfc1490f52c7363

The before trace’s SHA-256 matches the saved seed 1 fixture exactly: the original failing trace reproduced byte for byte, not a reconstruction. Setting quorum acknowledgement on 817857d produced the same trace as the fix. The rule change alone accounts for the difference between these runs.