MySQL的InnoDB存储引擎中,缓冲池中的Changer Buffer与系统表空间中的Changer Buffer的关系

MySQL的InnoDB存储引擎中,缓冲池中和系统表空间中都存在Changer Buffer,那它们之间的关系是怎样的呢?先来一张InnoDB存储引擎的架构图:

在这里插入图片描述
翻阅了MySQL官网发现如下:

1、https://dev.mysql.com/doc/refman/5.7/en/innodb-change-buffer.html
这里面有一句话:

 In memory, the change buffer occupies part of the buffer pool. On disk, the change buffer is part of the system tablespace, where index changes are buffered when the database server is shut down.

在内存中,change buffer是独立的,但是最终在系统空闲的时候merge到buffer pool中。
在磁盘上,change buffer是系统表空间的一部分,作为内存数据的备份。

2、另外可以参考:
https://dev.mysql.com/doc/refman/5.7/en/faqs-innodb-change-buffer.html

系统表空间中的change buffer是内存缓冲池中change buffer的备份,也就是说被持久化到了系统表空间中。在崩溃恢复的时候会从系统表空间的change buffer中读取信息到buffer pool。

A change buffer merge is performed during crash recovery. Changes are applied from the change buffer (in the system tablespace)  to leaf pages of secondary indexes as index pages are read into the buffer pool.

The change buffer is fully durable and will survive a system crash. Upon restart, change buffer merge operations resume as part of normal operations.
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章