Note
For V4.2.0, this parameter is available starting with V4.2.0.
Description
standby_db_preferred_upstream_log_region specifies the preferred region for log synchronization for a standby tenant.
Privilege requirements
Query the parameter
The
systenant and all user tenants can use theSHOW PARAMETERSstatement or theGV$OB_PARAMETERSview to query this parameter.Modify the parameter
The
systenant and user tenants can modify this parameter.
Attributes
| Attribute | Description |
|---|---|
| Type | String |
| Default value | The default value is "", which indicates that the system selects the machine and obtains logs based on the default strategy. |
| Value range | The value is the name of a region in the OceanBase cluster. |
| Modifiable | Yes. You can use the ALTER SYSTEM SET statement to modify the parameter. |
| Effective upon OBServer node restart | No. The setting takes effect immediately. |
Considerations
After you configure the
standby_db_preferred_upstream_log_regionparameter to specify the preferred region for log synchronization for a standby tenant, the standby tenant will prefer to synchronize logs from the machine in the specified region. To ensure high availability, the system will switch to another region to synchronize logs if the standby tenant cannot obtain logs from all machines in the specified region. The system will attempt to switch back to the specified region to continue log synchronization after a period of time.This parameter supports dynamic adjustment. When the standby tenant detects that the specified region for log synchronization has changed, the system will adjust the priority in real time and switch the machine.
Examples
Set the preferred region for log synchronization for a standby tenant in the
systenant of the cluster where the standby tenant is located.obclient> ALTER SYSTEM SET standby_db_preferred_upstream_log_region='BEIJING' tenant = 'restore_mysql_tenant';Set the preferred region for log synchronization for the standby tenant.
obclient> ALTER SYSTEM SET standby_db_preferred_upstream_log_region='BEIJING';
