OceanBase Database uses log persistence to synchronize data between multiple replicas.
Data are synchronized among multiple replicas based on Paxos. Specifically, OceanBase Database V4.0.0 abstracts the log service as Paxos-backed append-only log file system (Palf).
Palf is a basic component of the database and implements the following core features:
For transactional systems:
Implements write-ahead logging and realizes the atomicity and durability of transactions.
Returns timestamps with specific semantics for generating version numbers for transactions, such as read/write transactions and standby weak reads.
Achieves high performance for transactions while ensuring scalability in multi-core scenarios.
For distributed systems:
Ensures that data is successfully persisted in the majority of replicas based on Paxos, and provides disaster recovery capabilities through member changes to achieve high availability and high reliability.
Implements asynchronous replication.
Provides comprehensive diagnostic and monitoring capabilities to enable diagnostics and O&M.
In OceanBase Database V4.0.0, a log is represented by a unique log sequence number (LSN) in a log stream. You can use the LSN to uniquely locate a log on the memory and disk. A log that has been explicitly committed is exactly the same across multiple replicas.