Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: TiDB 开启binlog后,写入是否跟mysql一样是两阶段提交?
[TiDB Usage Environment] Production Environment / Testing / PoC
[TiDB Version]
[Reproduction Path] What operations were performed when the issue occurred
[Encountered Issue: Problem Phenomenon and Impact] In the official documentation, there is no description of the write process for binlog, so I want to learn more about it in the community.
[Resource Configuration] Go to TiDB Dashboard - Cluster Info - Hosts and take a screenshot of this page
[Attachments: Screenshots/Logs/Monitoring]
Both are supported, but there are differences in their implementation because TiDB is a distributed database system, while MySQL is a traditional single-node or master-slave replication architecture database.
TiDB also uses two-phase commit. You can refer to the source code analysis of TiDB binlog here:
TiDB Source Code Reading Series Article (24) TiDB Binlog Source Code Analysis | PingCAP
TiDB is a distributed transaction model based on the Raft consensus algorithm, which has certain differences from MySQL’s two-phase commit. However, both aim to solve consistency issues, and the end result is the same.
It is also a two-phase commit
Both are two-phase commits.
Both are two-phase commits, and there are specialized tools to parse binlogs.
Both are two-phase commits 
TiDB is a distributed transaction model based on the Raft consensus algorithm, which has certain differences from MySQL’s two-phase commit. However, both aim to solve consistency issues, and the end result is the same.
It also uses two-phase commit.
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.