1. Architectural Foundations of the ACID Properties of Distributed Database
In distributed database management systems, enforcing the acid properties of Distributed Database requires coordinating transactional states across multiple independent physical servers. Traditional monolithic relational databases execute transactions within a single shared memory space and unified disk storage subsystem. Conversely, a distributed database employs a shared-nothing architecture. It horizontally divides relational tables into smaller data shards or tablets across networked nodes. Under this partitioned topology, a single logical SQL transaction frequently mutates data residing on multiple physical machines. The database engine must guarantee Atomicity, Consistency, Isolation, and Durability across these autonomous nodes despite network latency and hardware failures.
Atomicity in a distributed environment dictates that a multi-partition transaction functions as an indivisible unit of work. Every participating node must either commit its local data mutation or abort the changes entirely. Partial commits across subsets of shards are strictly prohibited. Consistency ensures that any distributed transaction transitions the global database from one valid state to another valid state. The engine enforces primary key uniqueness, foreign key referential integrity, and data type constraints across all partition boundaries. Isolation prevents concurrent distributed transactions from observing intermediate or uncommitted states produced by other active transactions. Durability guarantees that once the distributed transaction coordinator confirms a commit, the state changes persist permanently in non-volatile storage across the cluster.
2. Distributed Atomicity and Consensus-Driven Durability
Maintaining Atomicity and Durability across sharded nodes requires integrating atomic commitment protocols with distributed consensus algorithms. Distributed transaction engines implement the Two-Phase Commit (2PC) protocol to coordinate multi-shard writes. During the Prepare phase, a designated transaction coordinator instructs all participating shard nodes to validate constraints and write redo and undo records to local write-ahead logs (WAL). Each participant responds with a prepared vote or an abort vote. During the Commit phase, if all participants vote to prepare, the coordinator writes a persistent commit record and instructs all nodes to apply the changes. If any single node fails to prepare, the coordinator issues a global rollback command.
Standard 2PC architectures suffer from single-point coordinator blocking and node availability risks. To eliminate these vulnerabilities, modern distributed databases bind each data partition to a consensus replication group managed by Paxos or Raft protocols. When a participant node writes a transaction prepare log or commit log, the log entry replicates across multiple physical replicas within the consensus group. A write operation succeeds as soon as a majority quorum of replicas persists the log to disk. This state machine replication model decouples Durability from individual disk hardware. If a physical server crashes during transaction execution, the surviving quorum elects a new partition leader instantly. The new leader recovers the exact transaction state from the replicated log stream and completes the 2PC protocol without blocking cluster operations.
3. Global Consistency and Distributed Isolation Mechanisms
Enforcing Consistency and Isolation across network-separated partitions demands precise ordering of read and write operations. Distributed databases implement Multi-Version Concurrency Control (MVCC) combined with pessimistic or optimistic locking protocols. When a transaction updates a row on a specific shard, the storage engine generates a new version of the data tuple rather than overwriting the existing record in place. Each tuple version receives a commit timestamp. This versioning mechanism allows read operations to access historical data states without blocking concurrent write operations.
To maintain consistent ordering across independent physical servers, the database cluster relies on a synchronized timekeeping architecture. Systems utilize either a centralized Global Transaction Service (GTS) or decentralized Hybrid Logical Clocks (HLC) to generate monotonically increasing global timestamps. When a distributed read query begins, it acquires a global read timestamp. As the query scans multiple shards, each node evaluates local MVCC tuple versions against this global timestamp. This ensures that the query observes a transactionally consistent point-in-time snapshot across the entire cluster, achieving Global Snapshot Isolation or Serializable isolation. Furthermore, concurrent multi-node updates can trigger distributed deadlocks. Distributed transaction engines run background deadlock detection algorithms, such as distributed wait-for graphs, to identify cyclic lock dependencies across shards and abort victim transactions automatically.
4. OceanBase Architectural Implementation of Distributed ACID Properties
OceanBase enforces strict distributed ACID properties natively within its shared-nothing relational database kernel. In an OceanBase cluster, user tables are horizontally partitioned into tablets. Each tablet is managed by an independent multi-replica Paxos consensus group. To guarantee Atomicity and Durability, OceanBase integrates an optimized two-phase commit protocol directly with its Paxos log replication pipeline. During distributed transaction execution, OceanBase designates the first participant partition as the transaction coordinator, eliminating external coordinator bottlenecks. Redo logs are synchronized across Paxos followers in parallel with local MemTable writes. Once a majority quorum of replicas persists the redo log, the state is permanently durable. This architecture delivers a Recovery Point Objective (RPO) of zero and an automated failover Recovery Time Objective (RTO) of less than eight seconds.
To enforce Global Consistency and Isolation under high concurrency, OceanBase utilizes a high-performance Global Timestamp Service (GTS) alongside a Log-Structured Merge-tree (LSM-tree) storage engine. The GTS provides low-latency, monotonically increasing timestamps across all cluster nodes. Multi-version data rows reside in memory within the MemTable and flush sequentially to immutable SSTables on disk. This structure allows OceanBase to execute lock-free consistent snapshot reads across multiple partitions while processing millions of concurrent write mutations. OceanBase natively supports Read Committed, Repeatable Read, and Serializable isolation levels. It also features an automated LCL (Label-Controlled Locking) distributed deadlock detection engine that resolves cross-node lock conflicts in milliseconds. By providing native distributed ACID compliance, OceanBase allows enterprises to migrate complex transactional SQL workloads from legacy monolithic databases without writing application-level compensation logic.