Senior Tony
Senior Tony
Nov 8, 2023 · Databases

Beyond Row and Table Locks: Uncovering MySQL’s Hidden Lock Types

This article examines MySQL's comprehensive lock taxonomy, starting from common row and table locks, then delving into lesser‑known mechanisms such as global locks, intention locks, auto‑increment locks, and Latch, while explaining their commands, use‑cases, and performance implications for developers and DBAs.

InnoDBLocksMySQL
0 likes · 10 min read
Beyond Row and Table Locks: Uncovering MySQL’s Hidden Lock Types
MaGe Linux Operations
MaGe Linux Operations
Jan 7, 2018 · Backend Development

Why Your Python with‑Statement Fails: Debugging Global Process Locks

The article examines a flawed implementation of a global process lock using Python's with statement, explains why exceptions raised in __enter__ are not caught by __exit__, demonstrates failing unit tests, and presents three alternative solutions—including a custom ABContext, use of the deprecated contextlib.nested, and a simple if‑statement workaround—to correctly manage exceptions in context managers.

Pythoncontext-managerexception-handling
0 likes · 6 min read
Why Your Python with‑Statement Fails: Debugging Global Process Locks