15.4.13 Redo Log
(Redo日志)
15.4.13.1 Group Commit for Redo Log Flushing
(基於
組提交的
Redo日志刷新)
The redo log is a disk-based data structure used during crash recovery to correct data written by incomplete transactions. During normal operations, the redo log encodes requests to change InnoDB table data that result from SQL statements or low-level API calls. Modifications that did not finish updating the data files before an unexpected shutdown are replayed automatically during initialization, and before the connections are accepted. For information about the role of the redo log in crash recovery, see Section 15.18.1, “The InnoDB Recovery Process”.
redo日志基於磁盤的數據結構,在崩潰恢復期間用於糾正不完整事務所寫入的數據。在正常操作情況下,redo日志編碼請求以改變InnoDB表數據,這些數據來自於SQL語句或低級API調用的結果。如果在意外關閉之前更新數據文件的操作沒有結束,這些修改在初始化期間(連接被接收接受之前)會自動重新執行。
By default, the redo log is physically represented on disk as a set of files, named ib_logfile0 and ib_logfile1. MySQL writes to the redo log files in a circular fashion. Data in the redo log is encoded in terms of records affected; this data is collectively referred to as redo. The passage of data through the redo log is represented by an ever-increasing LSN value.
默認情況下,redo日志物理上表現為磁盤上的一堆文件,名為ib_logfile0和ib_logfile1。MySQL以循環方式寫入redo日志文件。redo日志中的數據按照受影響的記錄進行編碼;這些數據整體被用於redo。數據穿過redo日志的通道用一個不斷增長的LSN值表示。
For related information, see:
相關信息,請參考:
- Section 15.6.1, “InnoDB Startup Configuration”
- 章節15.6.1,“InnoDB啟動配置”
- Section 9.5.4, “Optimizing InnoDB Redo Logging”
- 章節9.5.4,“優化InnoDB Redo日志”
- Section 15.7.2, “Changing the Number or Size of InnoDB Redo Log Files”
- 章節15.7.2,“修改InnoDB Redo日志文件的數量或大小”