Effect MVCC Snapshot Isolation
Readers that never block writers and never tear, plus the lost update snapshot isolation misses. Multi-version concurrency control gives every transaction a snapshot (the last version committed before it began), so a long read sees a stable point-in-time view while writers append new versions and neither waits. Snapshot isolation alone still allows two transactions to both read 100, both write 150, and lose one; first-committer-wins aborts the second with a typed WriteConflict. Each key keeps an append-only version list in a Ref and commit validates the write set in one atomic Ref.modify. The demo proves a stable read across a concurrent commit and a refused lost update. Pinned to effect 4.0.0-beta.98.
npx shadcn@latest add @compronents/effect-mvcc-snapshot-isolationInstalls from ui.aryank.space. Needs a registry token and a one-time @compronents entry in components.json. The docs walk through both.
Two transactions both read balance 100 and both write 150. Snapshot isolation alone lets the second overwrite the first: one +50 is silently lost, the balance lands at 150 instead of 200.