In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article shows you what the Mycat distributed transaction two-phase commit process is like, the content is concise and easy to understand, it will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.
The two-phase commit process can be illustrated by the following figure:
The explanation is as follows:
The first stage:
Transaction logs need to be written in the preparatory phase in case the machine fails in the second phase of commit and the transaction cannot be recovered.
MySQL did not fix a long-standing XA bug until a version of 5.7. that is, binlog does not write prepare logs, resulting in possible inconsistencies between master and slave data.
The second stage:
The purpose of dividing the commit into two phases is clear, that is, to commit the transaction as late as possible, so that the transaction can complete as much work as possible before committing, so that the final commit phase will be a very small operation that takes a very short time. The probability of failure of this operation in a distributed system is very small, that is, the so-called "network communication crisis period" is very short. This is the key to ensuring the atomicity of distributed transactions with two-phase commit.
The above is what the two-phase commit process of Mycat distributed transaction is like. Have you learned the knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.