当前位置:网站首页>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 边栏推荐
- Is it reliable for securities companies to register and open accounts? Is it safe?
- Host is not allowed to connect to this MySQL server
- Llvm and clang
- flex布局
- Cloud native: cloud computing technology is upgraded again to open an era of comprehensive cloud development
- LeetCode之三步问题
- Redis master-slave structure and application scenarios
- HJ base conversion
- Flutter realizes the function of "shake"
- HJ字符个数统计
猜你喜欢

22/02/15 study notes

Section 9: dual core startup of zynq

ZYNQ_ IIC read / write m24m01 record board status

The solution of "user account control to continue, please enter administrator user name and password" appears in win10 Professional Edition

Kubernetes cluster command line tool kubectl

SOC serial port configuration

Ambari (VII) --- ambari integrated hue4.2 document (valid for personal test)

"Three routines" of digital collection market

软件测试与质量期末复习

本周二晚19:00战码先锋第8期直播丨如何多方位参与OpenHarmony开源贡献
随机推荐
HJ质数因子
HJ21 简单密码
Is it reliable to open an account by digging money? Is it safe?
GPIO configuration of SOC
Airflow2.1.1 ultra detailed installation document
Airflow2.x distributed deployment DAG execution failure log cannot be obtained normally
Helloword routine for ROS
Kubelet garbage collection (exiting containers and unused images) source code analysis
Configuring multiple instances of MySQL under Linux
Rediscluster cluster mode capacity expansion node
PLC -- Notes
22/02/15 study notes
asp. Net datalist when there are multiple data displays
[JS] - [DFS, BFS application] - learning notes
【尚品汇】项目笔记
sql主從複制搭建
MMR rearrangement (similarity is calculated by editing distance and repeatability)
Application of XOR. (extract the rightmost 1 in the number, which is often used in interviews)
[thanos source code analysis series]thanos query component source code analysis
Redis cerebral fissure