MySQL gap locks and next-key locks: diagnosing and fixing deadlocks
InnoDB gap locks and next-key locks explained on a real case: deadlocks on concurrent INSERTs, diagnosis with SHOW ENGINE INNODB STATUS, and when READ COMMITTED fixes everything.

InnoDB gap locks and next-key locks explained on a real case: deadlocks on concurrent INSERTs, diagnosis with SHOW ENGINE INNODB STATUS, and when READ COMMITTED fixes everything.

A MySQL 8.0 e-commerce with 32 GB RAM running on 128 MB buffer pool. How we diagnosed the issue, fixed it, and cut query latency from 45ms to 3ms.
Start typing to search…
Select a result to see the preview