当前位置:网站首页>Why does MySQL need two-phase commit
Why does MySQL need two-phase commit
2022-07-06 04:45:00 【Chirp cat】
MySQL Why a two-phase submission is needed
Two stage submission diagram
Why a two-phase submission is needed ?
Guarantee binlog And redolog Data consistency .
If there is no two-stage submission :
First write redolog, To write binlog:
redolog finish writing sth. , I haven't written yet binlog,MySQL Downtime . After the restart ,redolog There are records in it ,MySQL Judge whether the transaction is submitted successfully , but binlog There is no record in the ,binlog And redolog Data inconsistency occurred . because binlog Yes, append write log , In the future binlog This data will always be missing . If used later binlog Recover the data at this point in time , There will be data loss .First write binlog, To write redolog:
binlog finish writing sth. , I haven't written yet redolog,MySQL Downtime . After the restart ,redolog There is no record of ,MySQL Judge transaction commit failure , however binlog There's a record in ,binlog And redolog Data inconsistency occurred . If you use it later binlog Restore data , There is one more transaction operation .
边栏推荐
- Word cover underline
- web工程导入了mysql驱动jar包却无法加载到驱动的问题
- CADD course learning (7) -- Simulation of target and small molecule interaction (flexible docking autodock)
- Patent | subject classification method based on graph convolution neural network fusion of multiple human brain maps
- Complete list of common functions of turtle module
- P2022 interesting numbers (binary & digit DP)
- Postman测试报告
- Basic explanation of turtle module - draw curve
- SQL injection vulnerability (MSSQL injection)
- The underlying structure of five data types in redis
猜你喜欢
MPLS experiment
CADD course learning (7) -- Simulation of target and small molecule interaction (flexible docking autodock)
ORM aggregate query and native database operation
Visio draw fan
Postman关联
Crazy God said redis notes
Fuzzy -- basic application method of AFL
Redis - redis in action - redis actual combat - actual combat Chapter 1 - SMS login function based on redis - redis + token shared session application - with code
Vulnerability discovery - vulnerability probe type utilization and repair of web applications
ISP learning (2)
随机推荐
RTP gb28181 document testing tool
Etcd database source code analysis -- etcdserver bootstrap initialization storage
The underlying structure of five data types in redis
Quick sort
牛顿插值法
ue5 小知识 FreezeRendering 查看视锥内渲染的物体
Implementation of knowledge consolidation source code 2: TCP server receives and processes half packets and sticky packets
The video in win10 computer system does not display thumbnails
Can Flink SQL read multiple topics at the same time. How to write in with
[Chongqing Guangdong education] Suzhou University English film and Television Appreciation reference materials
newton interpolation
Mysql database storage engine
Canal synchronizes MySQL data changes to Kafka (CentOS deployment)
CADD课程学习(7)-- 模拟靶点和小分子相互作用 (柔性对接 AutoDock)
二叉树基本知识和例题
Sqlserver query results are not displayed in tabular form. How to modify them
ORM aggregate query and native database operation
[mathematical modeling] differential equation -- sustainable development of fishing industry
[detailed steps of FreeRTOS shift value for the first time]
Word cover underline