Note
- This parameter was introduced in V1.4.
- Starting with V4.2.0, this parameter is available at the tenant level instead of the cluster level.
Description
The enable_rebalance parameter specifies whether to enable automatic load balancing. Different settings of the parameter apply to different balancing actions.
In the
systenant, this parameter specifies whether to enable cross-tenant load balancing.false: The system does not perform unit migration in the background. However, it performs unit migration when a node is offline or is in the DELETING state.
- true: The system performs unit migration to reach an even distribution.
- In a user tenant, this parameter specifies whether to enable in-tenant load balancing.
false: Load balancing is not performed in this tenant. In-flight load balancing operations are canceled. You cannot perform a scale-in or scale-out operation if this parameter is false.
- A scale-in or scale-out operation on the unit number of the tenant.
- A primary zone change for a preferred zone.
- No error is returned if the preferred zone does not change.
- A change in the number of F replicas when the primary zone is set to RANDOM.
- true: Load balancing is performed in this tenant.
- A scale-in or scale-out operation on the unit number of the tenant.
Note
- To enable cross-tenant load balancing, set the
enable_rebalanceparameter of the `sys` tenant to true. You can disable cross-tenant load balancing by setting theenable_rebalanceparameter to false. - To perform a scale-in or scale-out operation on a tenant or enable automatic load balancing, set the
enable_rebalanceparameter of the tenant to true. You can disable in-tenant load balancing by setting theenable_rebalanceparameter to false.
Privilege requirements
Query the parameter
You can run the
SHOW PARAMETERSstatement or query theGV$OB_PARAMETERSview in thesystenant and user tenants.Modify the parameter
You can modify the parameter in the
systenant and user tenants.
Attributes
| Attribute | Description |
|---|---|
| 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 cross-tenant load balancing and in-tenant load balancing.
obclient> ALTER SYSTEM SET enable_rebalance = false tenant = all_user;Enable cross-tenant load balancing.
obclient> ALTER SYSTEM SET enable_rebalance = true tenant='all_user';Disable cross-tenant load balancing, and enable in-tenant load balancing.
obclient> ALTER SYSTEM SET enable_rebalance = false tenant='all_user'; ALTER SYSTEM SET enable_rebalance = true tenant='MYSQL';