Crash-safe DDL of InnoDB Tables in MariaDB 10.6
summary
MariaDB 10.6 makes DDL crash-safe by adding one new file, ddl_recovery.log, and tighter locking: consistent metadata lock (MDL) use and exclusive InnoDB table lock for DDL. Recovery guarantees multipart operations (partitioned RENAME/CREATE/DROP) either complete or roll back; file renames and deletions are logged and fsynced before filesystem changes. Background DROP queue and dict_sys.mutex are removed, #sql-ib temporary files are used for safe deletes, and the implementation is deployed in 10.6.x and actively working.
AI-written summary · about
chapters (18)
- 0:00Introduction to crash-safe DDL
- 0:43Problem with old DDL operations
- 3:19DDL not transactional yet
- 6:35Removing unused system tables
- 8:04Metadata lock in DDL
- 11:47Old DDL recovery issues
- 16:31Background DROP TABLE queue
- 19:10Problems with statistics tables
- 19:32ACID principles in DML
- 23:40Applying ACID to DDL
- 26:42Making DDL atomic
- 29:02How DDL recovery works
- 31:02File deletion with #sql-ib
- 32:12Fixes for statistics tables
- 33:18FOREIGN KEY metadata storage
- 35:05Future of transactional DDL
- 37:21Long-term improvements
- 38:02Q&A
