Get the App
SLTechnology News&Howtos  ›  Development  › 

Example Analysis of InnoDB crash recovery process in mysql

Shulou Source: shulou.com Published: 2022-06-03 10:53:30 11月15日 Update

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 ()

Tags: Data articles examples processes analysis transactions more assurance impact good practical content background cycle periodicity garbage examples articles mechanisms tags Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker macOS Huawei Redmi Linux