Overview
enable_rebalance specifies whether to enable automatic load balancing.
The parameters under different tenants control different balancing operations:
Controls whether to perform inter-tenant balancing under the sys tenant.
- false: No unit migration will be performed in the background. However, when a node is permanently offline or in the DELETING state, unit migration is not controlled by this parameter.
- true: Unit migration can achieve a balanced state.
Controls whether to perform intra-tenant balancing under the user tenant.
false: No load balancing operation is in progress within the tenant, and any ongoing balancing operations will be canceled. If you attempt to increase or decrease the unit number of the tenant at this time, the system will report an error.
true: Load balancing operations are allowed within the tenant.
Note
- To enable load balancing between tenants, set the
enable_rebalanceparameter to True for the sys tenant. Disabling this parameter ensures no balancing operations are performed between tenants. - If you want to perform scaling operations on a tenant or use the automatic rebalancing capability of tenant partitions, you must enable the
enable_rebalanceparameter for the tenant to enable automatic load balancing and partition migration. Conversely, disabling this parameter stops automatic rebalancing operations within the tenant.
Privilege requirements
Query parameters
Both the
systenant and all user tenants can query this parameter using theSHOW PARAMETERSstatement or theGV$OB_PARAMETERSview.Modify parameters
Both 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 following methods:ALTER SYSTEM SETStatement modification. |
| Whether to restart the OBServer node for the change to take effect | No, the setting takes effect immediately. |
Configuration example
Both inter-tenant balancing and intra-tenant balancing are disabled.
obclient> ALTER SYSTEM SET enable_rebalance = false tenant = all_user;Enable only inter-tenant balancing.
obclient> ALTER SYSTEM SET enable_rebalance = true tenant='all_user';Disable inter-tenant balancing to enable intra-tenant balancing.
obclient> ALTER SYSTEM SET enable_rebalance = false tenant='all_user'; ALTER SYSTEM SET enable_rebalance = true tenant='MYSQL';