innodb double write buffer--struct

191 篇文章 87 订阅 ¥9.90 ¥99.00
123 篇文章 65 订阅 ¥19.90 ¥99.00
本文详细介绍了InnoDB存储引擎的双写缓冲区(double write buffer)结构,及其三种刷新策略:BUF_FLUSH_LRU用于批量从LRU列表中刷新,BUF_FLUSH_LIST针对FLUSH LIST进行刷新,而BUF_FLUSH_SINGLE_PAGE则针对单独页面进行刷新。这些策略确保了数据的安全性和持久性。
摘要由CSDN通过智能技术生成
/** Doublewrite control struct */
struct buf_dblwr_t{
	ib_mutex_t	mutex;	/*!< mutex protecting the first_free field and write_buf */
	ulint		block1;	/*!< the page number of the first doublewrite block (64 pages) */
	ulint		block2;	/*!< page number of the second block */
	ulint		first_free;/*!<在write_buf中的第一个空闲的位置*/
	ulint		b_reserved;/*!< 为批量刷写预留的slot个数 */
	os_event_t	b_event;/*!< event where threads wait for a batch flush to end. */
	ulint		s_reserved;/*!<为单个页刷新预留的slot个数,当flush类型为BUF_FLUSH_SINGLE_PAGE时,会进入函数buf_dblwr_write_single_page来写一个页 */
	os_event_t	s_event;/*!< event where threads wait for a single page flush slot. */
	bool*		in_use;	/*!<用于标记一个slot是否被使用。只用于single page flush */
	bool		batch_running;/*!<TRUE&#
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

yzs87

你的鼓励是我最大的动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值