standby_db_preferred_upstream_log_region specifies the preferred region for the standby tenant to synchronize upstream logs in the Physical Standby Database architecture.
Note
This parameter is available in OceanBase Database V4.2.0 and later.
| Property | Description |
|---|---|
| Type | STRING |
| Default value | The default value is "", which indicates that the standby tenant synchronizes logs from the servers selected based on the default strategy. |
| Value range | Regions in which the OceanBase cluster is deployed |
| Effective upon OBServer node restart | No |
Take note of the following considerations:
After you specify the
standby_db_preferred_upstream_log_regionparameter, the standby tenant synchronizes upstream logs first from the servers within the specified region. To achieve high availability, if the standby tenant cannot obtain logs from all servers in the specified region, the system switches to another region based on the specified rules and tries to switch back to the specified region after a period of time.This parameter takes effect immediately after a modification is saved. When the standby tenant detects that the specified region for log synchronization is changed, the system adjusts the priority in real time to perform server switchover.
Examples
Execute the following statement in the
systenant of the cluster where the standby tenant resides to set the preferred region for the standby tenant to synchronize logs.ALTER SYSTEM SET standby_db_preferred_upstream_log_region='BEIJING' tenant = 'restore_mysql_tenant';Execute the following statement in a standby tenant to set the preferred region for the standby tenant to synchronize logs:
ALTER SYSTEM SET standby_db_preferred_upstream_log_region='BEIJING';