Fencing in Practice: Pause at 7, Write at 8, Stale Dies in Storage

Fencing in Practice: Pause at 7, Write at 8, Stale Dies in Storage A sequence diagram generated by Archify. acquire lease epoch 7 durable monotonic epoch acquire after expiry epoch 8 write k=v token=8 op=b1 storage checks atomically ACCEPT highest=8 write k=v2 token=7 op=a1 A wakes with a stale epoch REJECT 7 below 8 stale epoch dies in storage write x=1 token=8 op=b2 same epoch, new op: legitimate ACCEPT retry op=b2 DEDUP, no second effect op dedup is separate from epoch Lease 7 pauses Lease 8 writes Stale wakes, dies Same-epoch writes Worker A · paused holder · Sequence participant Worker A paused holder Lock Service · issues epochs · Sequence participant Lock Service issues epochs Storage · atomic epoch check · Sequence participant Storage atomic epoch check Worker B · new holder · Sequence participant Worker B new holder Legend main request return security async trace message