Skip to main content

Lock Contention & Deadlocks

Learn Lock Contention & Deadlocks (Locks & Concurrency, MySQL) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

Introduction Lock contention is many transactions waiting for the same locks. A deadlock is a cycle of waits (A waits for B, B waits for A). InnoDB detects deadlocks, rolls back the cheaper transaction (the victim) and returns error 1213.

More lessons in Locks & Concurrency