当前位置:网站首页>MySQL implements transaction persistence using redo logs
MySQL implements transaction persistence using redo logs
2022-06-28 07:56:00 【star++】
summary
Mentioned earlier , In order to reduce the io operation , The loaded data page will be placed in Buffer pool, Wait until the time to brush the plate , Only then can the page data be really brushed to the disk for persistence . Suppose the modified dirty page , When the transaction has been committed , A sudden power failure , Then the modified dirty pages are lost , There is no way to ensure the persistence of transactions . This is the time redo Logs come in handy .
redo Log principle

1. When executing a write statement , First, it will be loaded into Buffer pool In the cache page of , Then modify the data in the page , Add to
flush In the list , We know that if the power is cut off at this time , The data is actually changed in memory , Data loss ,
This modified dirty page can no longer be recovered .
2. Add to flush In the list , In fact, it will be written into a file called redo Log file , Of course not directly , Direct is too slow ,
In fact, I first wrote a book called log buffer in , One is written each time mtr( Indivisible log group ), It can be understood as a log group .
How many bytes are written , So this lsn Record the offset .
3. If the power is cut off at this time , Or will it lead to log buffer Data loss for , Persistence is still not guaranteed . therefore , In fact, at some time
Go and put log buffer Of mtr Refresh to the real physics text 边栏推荐
- Explanation and application of instr() function in Oracle
- At 19:00 on Tuesday evening, the 8th live broadcast of battle code Pioneer - how to participate in openharmony's open source contribution in multiple directions
- HJ质数因子
- HJ删除字符串中出现次数最少的字符
- Makefile
- Redis one master multi slave cluster setup
- Study notes 22/1/11
- Ice - resources
- 剑指Offer||:链表(简单)
- 三角变换公式
猜你喜欢

Tencent continued to lay off staff in the second half of the year, and all business groups reduced by at least 10%. What do you think of this? Followers

Software design of resistance test board

Idea package together, using compact middle packages to solve &

Unity UI shadow component

Configuring MySQL multi instance master-slave synchronization for Linux

本周二晚19:00战码先锋第8期直播丨如何多方位参与OpenHarmony开源贡献

Spark 离线开发框架设计与实现

推荐系统系列精讲(第五讲): 排序模型的调优实践

Ambari (V) ---ambari integrated Azkaban (valid for personal test)

Application of XOR. (extract the rightmost 1 in the number, which is often used in interviews)
随机推荐
Three step problem of leetcode
分析 NFT 项目的 5 个指标
Redis one master multi slave cluster setup
Airflow2.1.1 ultra detailed installation document
HJ21 简单密码
Kubernetes cluster command line tool kubectl
[thanos source code analysis series]thanos query component source code analysis
Co process, asyncio, asynchronous programming
数字藏品市场“三大套路”
SOC timer and interrupt configuration
Is it reliable to open a new bond registration account? Is it safe?
Study notes 22/1/17
asp. Net error "/" server error in the application. String or binary data would be truncated. The statement...
MMR rearrangement (similarity is calculated by editing distance and repeatability)
HJ character count
Evaluation of inverse Polish expression < difficulty coefficient >
HJ score ranking
挖财注册开户靠谱吗?安全吗?
股票炒股注册开户靠谱吗?安全吗?
ZYNQ_ IIC read / write m24m01 record board status