Defines the service mode for a global table.
Data structure
PRIMARY_SECONDARY: Active-passive mode. The primary region handles read and write operations, while the secondary region is read-only. Data is synchronized from the primary region to the secondary region. This mode suits scenarios such as write-once-read-many with local reads, disaster recovery and backup, and remote hot standby.
PEER_TO_PEER: Multi-write mode. All regions support simultaneous read and write operations. Conflicts are resolved at the row or column level using the last write wins (LWW) principle. This mode suits applications that require low-latency reads and writes across multiple regions.
enum ServeMode {
//HOT_STANDBY = 1;
PRIMARY_SECONDARY = 2;
PEER_TO_PEER = 3;
}
该文章对您有帮助吗?