Blog: notes on backend, data and AI
Notes on backend engineering, data and building products with AI.
November 25, 2026 · 4 min read
MVCC in InnoDB: snapshot reads versus current reads
InnoDB keeps several versions of a row so readers do not block writers. The catch is that a plain SELECT and a locking read can see different data.
mysqlinnodbtransactions
November 25, 2026 · 4 min read
Isolation levels and anomalies in MySQL
Dirty reads, non-repeatable reads, phantoms and lost updates are what isolation levels are about. See what each level allows and what InnoDB does by default.
mysqlinnodbtransactions
November 25, 2026 · 4 min read
ACID in InnoDB: WAL, redo log, undo log and the binlog
ACID is not magic. In InnoDB, atomicity comes from the undo log, durability from the redo log, and the binlog is a separate log for replication and CDC.
mysqlinnodbtransactions
November 25, 2026 · 3 min read
Two-phase commit and XA: why it is hard to live with
Two-phase commit gives a real atomic commit across several databases, at the price of blocking, latency and a coordinator that must never be lost. Here is how it works and why microservices avoid it.
distributed-systemstransactionsmysql
November 25, 2026 · 4 min read
Safe transfers and double-spend prevention in one database
A correct transfer is one short transaction: record it once, lock the wallets in a fixed order, check and subtract atomically, write balanced ledger entries and commit.
paymentstransactionslocking