To use the tenant-level arbitration service, you must specify the downgrade timeout period. When the log synchronization fails due to the failure of half of the full-featured replicas and does not resume within the downgrade timeout period, the arbitration service automatically initiates the downgrade process to restore the database services. By default, the downgrade timeout period is 5s. The downgrade timeout period also represents the service downtime when an IDC fails.
Procedure
Log on to the database as the administrator of the
systenant or the user tenant for which the arbitration service is enabled.Note that you must specify the corresponding fields in the following sample code based on your actual database configurations.
obclient -h10.xx.xx.xx -P2883 -uroot@sys -p***** -AFor more information about how to connect to a database, see Database connection overview (MySQL mode) or Database connection overview (Oracle mode).
Query the downgrade timeout period of the arbitration service for the tenant.
obclient [(none)]> SHOW PARAMETERS LIKE 'arbitration_timeout'; *************************** 1. row *************************** zone: zone1 svr_type: observer svr_ip: 172.xx.xx.xx svr_port: 2882 name: arbitration_timeout data_type: NULL value: 5s info: timeout which will trigger automatic degrading when arbitration replica existsRange: [3s,+∞] section: TRANS scope: TENANT source: DEFAULT edit_level: DYNAMIC_EFFECTIVE 1 row in setSelect one of the following statements as needed to modify the downgrade timeout period.
The tenant-level
arbitration_timeoutparameter specifies the timeout period that triggers the automatic downgrade. Default value: 5s. Value range: [3s, + ∞). If you want to avoid the downgrade and achieve the effect that is similar to the Maximum Protection mode for standby clusters in primary/standby deployment in OceanBase Database V3.x, you can specify a larger value, such as30d, which indicates that the downgrade timeout period is 30 days. The modification of this parameter takes effect immediately without restarting the OBServer node.Execute the following statement in a user tenant to modify the downgrade timeout period for the tenant:
ALTER SYSTEM SET arbitration_timeout = '10s';Execute the following statement in the
systenant to modify the downgrade timeout period for a specified tenant:ALTER SYSTEM SET arbitration_timeout = '10s' TENANT = 'tenant_name';Execute the following statement in the
systenant to modify the downgrade timeout period for all tenants:ALTER SYSTEM SET arbitration_timeout = '10s' TENANT = all;
More information
For more information about the arbitration service, see the following topics: