当前位置:网站首页>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 .
边栏推荐
猜你喜欢

Recommendation | recommendation of 9 psychotherapy books

几种RS485隔离通讯的方案介绍
![[mathematical modeling] differential equation -- sustainable development of fishing industry](/img/7c/2ab6f2a34bc2c97318537ec8e0b0c5.png)
[mathematical modeling] differential equation -- sustainable development of fishing industry

Sorting out the latest Android interview points in 2022 to help you easily win the offer - attached is the summary of Android intermediate and advanced interview questions in 2022

Selection of slow motion function

View workflow

Patent | subject classification method based on graph convolution neural network fusion of multiple human brain maps

MPLS experiment

Flink kakfa data read and write to Hudi

Ue5 small knowledge points to enable the setting of lumen
随机推荐
C'est un petit résumé de l'étude.
Complete list of common functions of turtle module
729. My schedule I (set or dynamic open point segment tree)
Visio draws Tai Chi
[FreeRTOS interrupt experiment]
Selection sort
SharedPreferences source code analysis
Ue5 small knowledge points to enable the setting of lumen
Bubble sort
SQL injection vulnerability (MSSQL injection)
Recommendation | recommendation of 9 psychotherapy books
The IPO of mesk Electronics was terminated: Henan assets, which was once intended to raise 800 million yuan, was a shareholder
Quick sort
How do programmers teach their bosses to do things in one sentence? "I'm off duty first. You have to work harder."
P2022 interesting numbers (binary & digit DP)
Delete subsequence < daily question >
Redis - redis in action - redis actual combat - actual combat Chapter 1 - SMS login function based on redis - redis + token shared session application - with code
flink sql 能同时读多个topic吗。with里怎么写
English Vocabulary - life scene memory method
[mathematical modeling] differential equation -- sustainable development of fishing industry