Note
This parameter was introduced in V4.2.0.
Description
The partition_balance_schedule_interval parameter specifies the scheduling period for partition balancing.
Attributes
| Attribute | Description |
|---|---|
| Parameter type | Time |
| Default value | 2h
Note
|
| Value range | [0s,+∞)
NoteThe value 0s specifies to disable automatic partition balancing in the background. |
| Modifiability | Yes. It can be modified by using the ALTER SYSTEM SET statement. |
| Restart required for effect on OBServer node | No. The setting takes effect immediately. |
Considerations
The value of the
partition_balance_schedule_intervalparameter must be greater than the value of the balancer_idle_time parameter to enable partition balancing.**In V4.2.x other than V4.2.1, the behavior of partition balancing is different: **
- In versions earlier than V4.2.4
The automatic partition balancing interval is specified by this parameter.
In V4.2.4 and later
Starting from V4.2.4, you can schedule partition balancing. However, it is still recommended to use the
partition_balance_schedule_intervalparameter to specify the partition balancing interval. For user tenants created in V4.2.4, the default value of thepartition_balance_schedule_intervalparameter is 0, the default setting for enabling scheduled partition balancing is retained, and partition balancing is triggered by using scheduled tasks or manually by users.For user tenants upgraded to V4.2.4, the value of this parameter remains the same as in the source version, and scheduled partition balancing is disabled by default.
Examples
To modify only the parameter of the current tenant, execute the following statement in the tenant:
obclient [test]> ALTER SYSTEM SET partition_balance_schedule_interval = '1h';To modify the parameters of any tenants in the system tenant, execute the following statements:
obclient [test]> ALTER SYSTEM SET partition_balance_schedule_interval = '1h' tenant = all; obclient [test]> ALTER SYSTEM SET partition_balance_schedule_interval = '1h' tenant = 'tenant_name';