Example Analysis of InnoDB crash recovery process in mysql
This article will explain in detail the example analysis of the InnoDB crash recovery process in mysql. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.
1. Redo log operation: ensure that the latest data on the impact of committed transactions is brushed to the data page.
2. Undo log operation: ensure that the data pages affected by the uncommitted transaction are rolled back.
3. Write buffer (change buffer) merging.
4. Purge operation.
A garbage collection mechanism of InnoDB that uses separate background threads to periodically process data marked for deletion in an index.
Example
/ * Look for MLOG_CHECKPOINT. * / recv_group_scan_log_recs (group, & contiguous_lsn, false); / * The first scan should not have stored or applied any records. * / ut_ad (recv_sys- > n_addrs = = 0); ut_ad (! recv_sys- > found_corrupt_fs); if (recv_sys- > found_corrupt_log & &! srv_force_recovery) {log_mutex_exit (); return (DB_ERROR);} if (recv_sys- > mlog_checkpoint_lsn = = 0) {if (! srv_read_only_mode & & group- > scanned_lsn! = checkpoint_lsn) {ib::error ()