Skip to content

Latest commit

 

History

History
14 lines (9 loc) · 864 Bytes

redo.md

File metadata and controls

14 lines (9 loc) · 864 Bytes

Redo

I learned from this page.

Redo log

The redo log is a InnoDB log and a Write-Ahead Log (WAL). Two or more redo logs (ib_logfile0, ib_logfile1, ...) are pre-allocated and used in a circular fashion. And they are used to reconstruct changes if necessary (crash recovery).

Redo logging in practice

  • Every data change is written to the redo log buffer as the table data is modified.
  • The redo log buffer is written to disk (but not synced) when each page modification is complete.
  • The redo log is synced to disk up to a the page's modification LSN before a page can be flushed to disk.
  • Depending on innodb_flush_log_at_trx_commit, the log may be synced to disk at transaction commit.