Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition does not support the arbitration service.
When you enable the arbitration service for a tenant, you must specify the log stream downgrade control time. When log synchronization fails due to failures of half of the full-featured replicas and the log stream downgrade control time is reached, the arbitration service automatically performs the log stream downgrade process to recover services. The default log stream downgrade control time is 5s, which indicates the service interruption duration when an IDC fails.
Procedure
Log on to the database as an administrator of the
systenant or a user tenant.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 Overview (MySQL mode) or Overview (Oracle mode).
Query the log stream downgrade control time of the arbitration service for a tenant.
Execute the following statement in the
systenant to query the log stream downgrade control time for the specified tenant:SHOW PARAMETERS LIKE 'arbitration_timeout' TENANT = 'tenant_name';Here is an example:
SHOW PARAMETERS LIKE 'arbitration_timeout' TENANT = 'mysql';Execute the following statement in a user tenant to query the log stream downgrade control time for the user tenant:
SHOW PARAMETERS LIKE 'arbitration_timeout';
The query result is as follows:
+-------+----------+----------------+----------+---------------------+-----------+-------+---------------------------------------------------------------------------------------------+---------+--------+---------+-------------------+ | zone | svr_type | svr_ip | svr_port | name | data_type | value | info | section | scope | source | edit_level | +-------+----------+----------------+----------+---------------------+-----------+-------+---------------------------------------------------------------------------------------------+---------+--------+---------+-------------------+ | zone1 | observer | xx.xx.xx.197 | 2882 | arbitration_timeout | NULL | 5s | The timeout before automatically degrading when arbitration member exists. Range: [3s,+∞] | TRANS | TENANT | DEFAULT | DYNAMIC_EFFECTIVE | | zone2 | observer | xx.xx.xx.194 | 2882 | arbitration_timeout | NULL | 5s | The timeout before automatically degrading when arbitration member exists. Range: [3s,+∞] | TRANS | TENANT | DEFAULT | DYNAMIC_EFFECTIVE | +-------+----------+----------------+----------+---------------------+-----------+-------+---------------------------------------------------------------------------------------------+---------+--------+---------+-------------------+ 2 rows in setSelect an appropriate statement to modify the log stream downgrade control time based on your business scenario.
The
arbitration_timeoutparameter specifies the control time for triggering automatic downgrade of a log stream for a tenant. The default value is 5s. The value range is [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 log stream downgrade control time for the user tenant:
ALTER SYSTEM SET arbitration_timeout = '10s';Execute the following statement in the
systenant to modify the log stream downgrade control time for the specified tenant:ALTER SYSTEM SET arbitration_timeout = '10s' TENANT = 'tenant_name';Execute the following statement in the
systenant to modify the log stream downgrade control time for all tenants:ALTER SYSTEM SET arbitration_timeout = '10s' TENANT = all;
References
For more information about the arbitration service, see the following topics: