Overview
Distributed database transactions refer to a set of database operations executed across multiple nodes or shards within a distributed database system. These operations are either fully executed or not executed at all to maintain a consistent state of the database.
The Basic Properties of Transactions (ACID)
Distributed database transactions adhere to the ACID principles:
Atomicity: All operations in a transaction are either fully completed or not executed at all. TDSQL Boundless uses the two-phase commit protocol (2PC) to ensure the atomicity of transactions.
Consistency: Before and after transaction execution, the database transitions from one consistent state to another consistent state.
Isolation: Concurrently executed transactions are isolated from each other. TDSQL Boundless supports Read Committed and Repeatable Read isolation levels.
Durability: Once a transaction is committed, its results are permanently saved in the database. TDSQL Boundless synchronizes data to multiple replicas via the Raft protocol, ensuring that transaction data will not be lost as long as a majority of replicas survive.