Note
- This parameter was introduced in V1.4.
- This parameter was promoted from cluster-level to tenant-level in V4.2.0.
Description
The enable_rebalance parameter specifies whether to enable automatic load balancing.
The configurations of different tenants control different balancing operations:
In the system tenant, this parameter specifies whether to perform tenant-level balancing.
- false: No background unit migration is performed. However, unit migration is not controlled by this parameter when a node is permanently offline or in the DELETING state.
- true: You can perform unit migration to achieve load balancing.
In a user tenant, this parameter specifies whether to perform tenant-level balancing.
- false: No load balancing is performed in the tenant. Ongoing balancing operations are canceled. If you perform the following operations, an error will be returned:
- Increase or decrease the number of units in the tenant.
- Change the first-priority primary zone. If the first-priority primary zone does not change, no error is returned.
- Change the number of F replicas when the primary zone is set to RANDOM.
- true: Load balancing can be performed in the tenant.
- false: No load balancing is performed in the tenant. Ongoing balancing operations are canceled. If you perform the following operations, an error will be returned:
Note
- If you want to perform load balancing between tenants, set the
enable_rebalanceparameter in the system tenant to True. If you set this parameter to False, tenant-level load balancing will not be performed. - If you want to perform scaling or use automatic partition migration, you must set the
enable_rebalanceparameter in the tenant to True to enable automatic load balancing and partition migration. Otherwise, automatic load balancing and partition migration will be disabled in the tenant.
Privilege requirements
Query the parameter
The
systenant and all user tenants can execute theSHOW PARAMETERSstatement or query theGV$OB_PARAMETERSview to query the parameter.Modify the parameter
The
systenant and user tenants can modify the parameter.
Attributes
| Attribute | Description |
|---|---|
| Type | BOOL |
| Default value | True |
| Value range |
|
| Modifiable | Yes. The ALTER SYSTEM SET statement can be used to modify the parameter. |
| Effective upon OBServer node restart | No, the setting takes effect immediately. |
Examples
Disable both tenant-level and tenant-level balancing.
obclient> ALTER SYSTEM SET enable_rebalance = false tenant = all_user;Enable only tenant-level balancing.
obclient> ALTER SYSTEM SET enable_rebalance = true tenant='all_user';Enable tenant-level balancing but disable tenant-level balancing.
obclient> ALTER SYSTEM SET enable_rebalance = false tenant='all_user'; ALTER SYSTEM SET enable_rebalance = true tenant='MYSQL';