[译]MySQL 5.7 Reference Manual::Redo Log

本文深入探讨了InnoDB存储引擎中的RedoLog机制,包括其如何通过组提交提高效率,以及在系统崩溃后的恢复过程。同时介绍了RedoLog的基本工作原理、数据结构及其在事务提交中的作用。

15.4.13 Redo Log(重做日志)

 

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

InnoDB, like any other ACID-compliant database engine, flushes the redo log of a transaction before it is committed. InnoDB uses group commit functionality to group multiple such flush requests together to avoid one flush for each commit. With group commit, InnoDB issues 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 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, seeSection 15.18.1, “The InnoDB Recovery Process”.

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

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 Log表示在物理位置上的一组文件,名字是 ib_logfile0 和ib_logfile1Mysql对Redo Log是一种循环写入的方式,Redo Log 按照受影响的行进行编码,这些数据统称重做(Redo),通过一个自增长的LSN值表示数据的从头到尾的增长。

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

转载于:https://my.oschina.net/ij5IYLKW/blog/818470

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值