[译]MySQL 5.7 Reference Manual::Redo Log

2017-01-05 11:08:39来源:oschina作者:Ambitor人点击


15.4.13Redo Log(重做日志)

15.4.13.1 Group Commit for Redo Log Flushing(以组提交的方式把Redo Log刷到磁盘)


InnoDB, like any otherACID-compliant database engine, flushes theredo logof a transaction before it is committed.InnoDBusesgroup commitfunctionality to group multiple such flush requests together to avoid one flush for each commit. With group commit,InnoDBissues a single write to the log file to perform the commit action for multiple user transactions that commit at about the same time, significantly improving throughput.


翻译:InnoDB像其它支持标准ACID事务的数据区引擎一样,在提交事务之前就会刷新事务的Redo Log到磁盘,InnoDB用组提交的方式归类多组然后一起提交到磁盘,避免他们单独提交。在组提交的模式下,InnoDB为多个用户事务的操作提交一条写日志(Redo Log)的请求,大大的提高了吞吐量。


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 changeInnoDBtable 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, seeSection15.18.1, “The InnoDB Recovery Process”.


翻译:Redo Log是一种基于硬盘的数据结构(以Page为单位二进制),主要用于mysql宕机后恢复不完整事务。在正常的操作情况下,Redo Log编码是来自改变表数据那些Sql表达式执行或底层API调用。在Mysql初始化的时候(接受请求之前)修复因为Mysql异常宕机导致未刷新到磁盘的数据文件。关于Redo Log在宕机中恢复的更多规则请看Section15.18.1, “The InnoDB Recovery Process”


By default, the redo log is physically represented on disk as a set of files, namedib_logfile0andib_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-increasingLSNvalue.


翻译:默认情况下,Redo Log表示在物理位置上的一组文件,名字是ib_logfile0和ib_logfile1。Mysql对Redo Log是一种循环写入的方式,Redo Log 按照受影响的行进行编码,这些数据统称重做(Redo),通过一个自增长的LSN值表示数据的从头到尾的增长。


For related information, see:(相关信息请看)

Section15.6.1, “InnoDB Startup Configuration”(InnoDB 启动配置)


Section9.5.4, “Optimizing InnoDB Redo Logging”(优化InnoDB Redo日志)


Section15.7.2, “Changing the Number or Size of InnoDB Redo Log Files”(改变Redo Log的文件数量及大小)

最新文章

123

最新摄影

微信扫一扫

第七城市微信公众平台