当前位置:网站首页>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 .
边栏推荐
- Dry goods collection | Vulkan game engine video tutorial
- Leetcode 186 Flip the word II in the string (2022.07.05)
- Ue5 small knowledge points to enable the setting of lumen
- Excellent PM must experience these three levels of transformation!
- acwing周赛58
- View workflow
- 11. Intranet penetration and automatic refresh
- [05-1, 05-02, 05-03] network protocol
- 力扣(LeetCode)186. 翻转字符串里的单词 II(2022.07.05)
- [NOIP2009 普及组] 分数线划定
猜你喜欢
Dry goods collection | Vulkan game engine video tutorial
RTP GB28181 文件测试工具
程序员在互联网行业的地位 | 每日趣闻
[Chongqing Guangdong education] engineering fluid mechanics reference materials of southwestjiaotonguniversity
二叉树基本知识和例题
The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower
Database - MySQL storage engine (deadlock)
IPv6 comprehensive experiment
[mathematical modeling] differential equation -- sustainable development of fishing industry
canal同步mysql数据变化到kafka(centos部署)
随机推荐
2327. Number of people who know secrets (recursive)
[Zhao Yuqiang] deploy kubernetes cluster with binary package
word封面下划线
Quatre méthodes de redis pour dépanner les grandes clés sont nécessaires pour optimiser
MPLS experiment
[try to hack] John hash cracking tool
[HBZ sharing] how to locate slow queries in cloud database
Basic explanation of turtle module - draw curve
[detailed steps of FreeRTOS shift value for the first time]
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
CADD course learning (8) -- virtual screening of Compound Library
[05-1, 05-02, 05-03] network protocol
How does computer nail adjust sound
Meet diverse needs: jetmade creates three one-stop development packages to help efficient development
Selection sort
Lagrange polynomial
也算是學習中的小總結
Knowledge consolidation source code implementation 3: buffer ringbuffer
Redis 排查大 key 的4种方法,优化必备
【HBZ分享】ArrayList的增删慢查询快的原因