OceanBase Database provides two tenant roles: PRIMARY and STANDBY. All tenants created in common scenarios are primary tenants. Tenants created by using a Physical Standby Database solution are standby tenants.
You can dynamically change the role of a tenant by performing a switchover or failover operation.
Switchover
A switchover operation changes the role of a tenant as scheduled. After you perform a switchover operation on a primary tenant and a standby tenant, their roles are exchanged. The entire process is completed within seconds, with a recovery point objective (RPO) of 0 and no data loss.
Failover
A failover operation is usually performed when an unrecoverable failure occurs in a primary tenant. After you perform a failover operation on a standby tenant, the role of the standby tenant changes to PRIMARY. If the standby tenant is normally synchronized before the primary tenant fails, data loss of hundreds of milliseconds occurs, and the entire process is completed within seconds.