当前位置:网站首页>Two stage submission and three stage submission
Two stage submission and three stage submission
2022-07-27 15:21:00 【Hua Weiyun】
Two stage submission and three-stage submission
Two-phase commit
In the last article, we talked about two-stage submission 2pc, Two phase submission still has many disadvantages , It may cause data inconsistency due to network problems , For example, only some participants can receive the request to submit a transaction sent by the coordinator due to network problems , In this way, some participants commit transactions while others fail to commit, resulting in data inconsistency , The second problem is if the coordinator hangs up , The participant has neither committed nor rolled back , The third problem is that the services of participating nodes are blocked when executing at the same time , Can't provide external services
Three stage commit
So what is three-phase submission , Can three-stage submission solve these problems ?
The three-stage submission is divided into CanCommit Stage ,PreCommit Phase and doCommit Stage . The first stage is to check whether its state meets the conditions of transaction operation , Generally, it is possible to obtain the lock of this distributed transaction first , The second stage is to start the transaction , But didn't submit , And return the result to the coordinator , The third stage is the commit or rollback of transactions .
This is the general content of the three-stage submission , So does the three-phase submission solve the problems caused by the two-phase submission ? Three stage submission participants also have a timeout mechanism , stay preCommit When , If the coordinator's message is not received, the interrupt transaction will be executed , stay doCommit If the coordinator's message is not received in the phase, the transaction will be committed , The problem of data consistency and the coordinator's single point of failure still exist
summary
There will be some problems in two-phase submission and three-phase submission , Compared with the two-phase submission, the three-phase submission has more participants' timeout mechanism , But the remaining problems have not been solved , For example, the consistency of data and the single point of failure of the coordinator .
️ Thank you for your
If you think this is helpful for you :
- Welcome to follow me ️, give the thumbs-up , Comment on , forward
- Focus on
Panpan small class, Push good articles for you regularly , There are also group chat and irregular lottery activities , You can say what you want , Communicate with the great gods , Learning together .
边栏推荐
- LeetCode 74. 搜索二维矩阵 二分/medium
- MySQL 面试40连问,面试官你再问下去我可要翻脸了
- Unity性能优化------DrawCall
- 网络设备硬核技术内幕 路由器篇 3 贾宝玉梦游太虚幻境 (中)
- 资本频频加码,急于上市的和府捞面有多“疯狂”?
- 多表查询_练习1&练习2&练习3
- [Yunxiang book club issue 13] packaging format of video files
- 网络设备硬核技术内幕 路由器篇 13 从鹿由器到路由器(上)
- 《剑指Offer》 链表反转
- The design method of integral operation circuit is introduced in detail
猜你喜欢

reflex

adb命令 (安装apk包格式:adb install 电脑上apk地址包名)

西瓜书《机器学习》阅读笔记之第一章绪论

Code coverage statistical artifact -jacobo tool practice
USB interface electromagnetic compatibility (EMC) solution

Basic usage of kotlin

STM32F103C8T6在Arduino框架下驱动SH1106 1.3“ IIC OLED显示

Zhou Hongyi: if the digital security ability is backward, it will also be beaten

Design scheme of digital oscilloscope based on stm32

CAN总线的EMC设计方案
随机推荐
网络设备硬核技术内幕 路由器篇 3 贾宝玉梦游太虚幻境 (中)
Internship: compilation of other configuration classes
MOS管防止电源反接的原理
[work] about technical architecture
Discussion on STM32 power down reset PDR
Finally, someone finished all the dynamic planning, linked list, binary tree and string required for the interview
网络设备硬核技术内幕 路由器篇 16 DPDK及其前传(一)
LeetCode 783. 二叉搜索树节点最小距离 树/easy
基于FIFO IDT7202-12的数字存储示波器
Stm32f103c8t6 drives ssd1306 0.96 "IIC OLED display under Arduino frame
USB2.0接口的EMC设计方案
Code coverage statistical artifact -jacobo tool practice
Comparison of advantages and disadvantages between instrument amplifier and operational amplifier
adb命令 (安装apk包格式:adb install 电脑上apk地址包名)
魔塔项目中的问题解决
Unity性能优化------渲染优化(GPU)之Occlusion culling(遮挡剔除)
EMC design scheme of USB2.0 Interface
What is the breakthrough point of digital transformation in the electronic manufacturing industry? Lean manufacturing is the key
LeetCode 81. 搜索旋转排序数组 II 二分/medium
3.3-5v转换