Note
- This parameter is available starting with V1.4.
- This parameter is available starting with V4.2.0, and its scope is changed from cluster-level to tenant-level.
Description
enable_rebalance specifies whether to enable automatic load balancing.
The parameter controls different balancing operations in different tenants:
In the sys tenant, the parameter specifies whether to enable inter-tenant load balancing.
- false: The system does not perform background unit migration. However, unit migration is not controlled by this parameter when a node is permanently offline or in the DELETING state.
- true: The system performs unit migration to achieve load balancing.
In a user tenant, the parameter specifies whether to enable intra-tenant load balancing.
false: The system does not perform load balancing within the tenant. Any ongoing load balancing operation is canceled. If you attempt to increase or decrease the number of units in the tenant at this time, an error is returned.
true: The system performs load balancing within the tenant.
Note
- To enable inter-tenant load balancing, set the
enable_rebalanceparameter to True in the sys tenant. Disabling this parameter ensures that no inter-tenant load balancing is performed. - To enable tenant scaling or automatic partition balancing, set the
enable_rebalanceparameter to True in the tenant. This enables automatic load balancing and partition migration. Conversely, disabling this parameter stops automatic load balancing within the tenant.
Privilege requirements
Query the parameter
The
systenant and all user tenants can query the value of this parameter by using theSHOW PARAMETERSstatement or theGV$OB_PARAMETERSview.Modify the parameter
The
systenant and user tenants can modify this parameter.
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 inter-tenant and intra-tenant load balancing.
obclient> ALTER SYSTEM SET enable_rebalance = false tenant = all_user;Enable only inter-tenant load balancing.
obclient> ALTER SYSTEM SET enable_rebalance = true tenant='all_user';Disable inter-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';