Crash-safe XA and its replication in MariaDB
summary
MariaDB implements XA as fully crash-safe by writing the transaction body to the binlog before doing engine prepare, so a crash in the tiny window is recovered by roll-forward recovery from binlog rather than complex freshness logic. Fixes tracked as MDEV-742 and MDEV-21469 (with engine recovery via persistent binlog considered in MDEV-18959) cover multi-engine cases (InnoDB, RocksDB) and replication; benchmarks show sync_binlog=1 with innodb_flush_log_at_trx_commit=0 is both crash-safe for XA workloads and faster than the old defaults.
AI-written summary · about
chapters (10)
- 0:00Introduction to XA in MariaDB
- 1:17XA transaction basics
- 3:00History of XA crash safety issues
- 7:38Crash recovery challenge for XA
- 12:14Solution for crash-safe XA
- 15:05Live demo of XA recovery
- 18:18Performance benefits of crash-safe XA
- 21:25Extending recovery to non-XA transactions
- 27:12Future plans for XA improvements
- 28:19Q&A on XA transactions
