Two transactions · one wait-for graph · one question: is there a cycle?

🔒 Locks & Deadlock

Watch two transactions take locks and wait on each other, with the wait-for graph drawn underneath — because the whole subject reduces to one question: do the arrows close into a cycle? Four models cover the classic A-to-B transfer deadlock and why a consistent lock order is a proof rather than a mitigation, the upgrade deadlock that needs only one row, the queue behind a slow lock holder that raises no error at all, and the missing index that turns a one-row update into a table-wide block. Each step lights up the matching line of SQL and TypeScript.

Space = run/pause · ← → = step

1/1 Speed