Note
- This parameter is available starting with V1.4.
- This parameter is available starting with V4.2.0. The scope of this parameter 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, this parameter specifies whether to enable tenant-level load balancing.
- false: The system does not perform background unit migration. However, the system performs unit migration when a node is permanently offline or in the DELETING state.
- true: The system performs unit migration to balance the load.
In a user tenant, this parameter specifies whether to enable automatic load balancing.
false: The system does not perform load balancing. If the system is performing load balancing, it cancels the operation. If you want to scale in or out a tenant, the system returns an error.
true: The system performs load balancing.
Note
- To enable tenant-level load balancing, set the
enable_rebalanceparameter to True in the sys tenant. To disable tenant-level load balancing, set theenable_rebalanceparameter to False. - To enable automatic load balancing and automatic partition migration, set the
enable_rebalanceparameter to True in the user tenant. To disable automatic load balancing and automatic partition migration, set theenable_rebalanceparameter to False.
Privilege requirements
Query the parameter
You can query the value of this parameter by using the
SHOW PARAMETERSstatement or theGV$OB_PARAMETERSview in the sys tenant and all user tenants.Modify the parameter
You can modify this parameter in the sys tenant and all 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 tenant-level load balancing and automatic load balancing.
obclient> ALTER SYSTEM SET enable_rebalance = false tenant = all_user;Enable tenant-level load balancing and disable automatic load balancing.
obclient> ALTER SYSTEM SET enable_rebalance = true tenant='all_user';Disable tenant-level load balancing and enable automatic load balancing.
obclient> ALTER SYSTEM SET enable_rebalance = false tenant='all_user'; ALTER SYSTEM SET enable_rebalance = true tenant='MYSQL';
