Note
- This parameter is available starting with V1.4.
- This parameter is available starting with V4.2.0 and is a tenant-level parameter.
Description
enable_rebalance specifies whether to enable the automatic load balancing feature.
The value of this parameter in different tenants controls the different balancing operations.
In the system tenant, this parameter specifies whether to enable cross-tenant load balancing.
- false: The system does not perform background unit migration. However, when a node is offline or in the DELETING state, this parameter does not affect unit migration.
- true: The system can perform unit migration to balance the load.
In a user tenant, this parameter specifies whether to enable intra-tenant load balancing.
false: Load balancing will not be performed for this tenant. Any ongoing balancing operations will be canceled. If you perform a scaling operation under this condition, an error will be returned. For example, an error will be returned when you perform the following operations:
Increase or decrease the number of resource units for the tenant.
Change the primary zone of the first priority, provided that the primary zone of the first priority does not change, no error will be returned.
If the primary zone is RANDOM, change the number of F replicas.
Note
For V4.2.5:
- Starting from V4.2.5 BP5, when the
enable_rebalanceparameter is set tofalse, the system will not return an error when you increase or decrease the number of resource units for the tenant. - Starting from V4.2.5 BP1, when the
enable_rebalanceparameter is set tofalse, the system will not return an error when you change the primary zone of the first priority or change the number of F replicas, provided that the primary zone is RANDOM. - Although the above operations will not return an error after the
enable_rebalanceparameter is set tofalse, log load balancing is still not initiated. You can perform the required changes by using this parameter in batch, and then enable load balancing after all changes are completed.
true: Load balancing will be performed for the tenant.
Note
- If you want to enable cross-tenant load balancing, set the
enable_rebalanceparameter in the system tenant to True. If you do not want to perform cross-tenant balancing, set this parameter to false. - If you want to perform scaling operations on the tenant or enable the automatic load balancing capability of tenant partitions, set the
enable_rebalanceparameter in the tenant to true. This way, the automatic load balancing and partition migration can be initiated. If you do not want to perform automatic load balancing, set this parameter to false.
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
You can set the
enable_rebalanceparameter for thesystenant and user tenants.
Attributes
| Attribute | Description |
|---|---|
| Parameter type | Bool |
| Default value | True |
| Value range |
|
| 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. |
Examples
Disable both cross-tenant and intra-tenant load balancing.
obclient> ALTER SYSTEM SET enable_rebalance = false tenant = all_user;Enable only cross-tenant load balancing.
obclient> ALTER SYSTEM SET enable_rebalance = true tenant='all_user';Disable cross-tenant load balancing and enable intra-tenant load balancing.
obclient> ALTER SYSTEM SET enable_rebalance = false tenant='all_user'; ALTER SYSTEM SET enable_rebalance = true tenant='MYSQL';