Module 3 · Dive 3.3
The conditional-write fence.
The OCC commit kept one process honest. Off the box, the writers are different nodes — after a partition, two may both think they’re primary and both try to write commit LSN 7. The referee is the object store: create-if-not-exists lets the first PUT through and rejects the second. Toggle the fence off and watch what you lose.
One key, one winner
interactiveWhy this is the durability floor
graft.engine-split.design.mdThe whole replicated design rests on this one atomic guarantee from the object store, and nothing more: a write that succeeds only if the key does not already exist. Both engines lean on it identically — the native one via Tigris’s conditional headers, the Rust one via OpenDAL’s if-not-exists, which surfaces the rejection as a precondition failure. That single primitive is what turns “append the next LSN” into a safe operation across nodes, with no lock service, no consensus cluster, no coordinator. Take it away — the fence-off case — and two primaries quietly diverge. With it, the page engines you meet in Chapter III are built on solid ground.
References & sources
- External
- Tigris object conditionalsIf-None-Match, create-if-not-exists
- Apache OpenDALif-not-exists → precondition failed (Rust engine)
- Split-brainwhat the fence prevents
- Echo records
- graft.engine-split.design.mdRemoteCommit fence in both engines
- graft.design.mdconditional commit, the replicated floor