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

A blog to achieve embedded entry

How do programmers teach their bosses to do things in one sentence? "I'm off duty first. You have to work harder."

Postman断言

Zynq learning notes (3) - partial reconfiguration

ETCD数据库源码分析——etcdserver bootstrap初始化存储

Jd.com 2: how to prevent oversold in the deduction process of commodity inventory?

The value of two date types is subtracted and converted to seconds

Visio draws Tai Chi

The IPO of mesk Electronics was terminated: Henan assets, which was once intended to raise 800 million yuan, was a shareholder

SQL injection vulnerability (MSSQL injection)
随机推荐
How to realize automatic playback of H5 video
关于imx8mp的es8316的芯片调试
【HBZ分享】云数据库如何定位慢查询
RTP GB28181 文件测试工具
Redis 排查大 key 的4种方法,优化必备
Weng Kai C language third week 3.1 punch in
C. The third problem
内核判断i2c地址上是否挂载外设
It is also a small summary in learning
word封面下划线
canal同步mysql数据变化到kafka(centos部署)
[NOIP2008 提高组] 笨小猴
Visio draws Tai Chi
Easyrecovery靠谱不收费的数据恢复电脑软件
Dry goods collection | Vulkan game engine video tutorial
View workflow
ISP learning (2)
Yyds dry goods inventory OSI & tcp/ip
Selection of slow motion function
Yyds dry inventory automatic lighting system based on CC2530 (ZigBee)