Note
- For V4.6.x, this parameter is available starting with V4.6.0.
- For V4.4.x, this parameter is available starting with V4.4.2.
- For V4.2.5, this parameter is available starting with V4.2.5 BP6.
Description
enable_ls_leader_balance specifies whether to enable automatic leader rebalancing for log streams.
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 use theALTER SYSTEM SETstatement to modify this parameter.
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. |
Considerations
When enable_rebalance is enabled (
True), you can disable automatic leader rebalancing for log streams by settingenable_ls_leader_balancetoFalse.When
enable_ls_leader_balanceis disabled (False), automatic leader switching does not occur at the log stream level. However, leader switching may still occur at the partition level due to log stream transfers between different leaders.
Examples
Disable automatic leader rebalancing for log streams in the user tenant.
obclient> ALTER SYSTEM SET enable_ls_leader_balance = False;Disable automatic leader rebalancing for log streams in the
mysqltenant.obclient> ALTER SYSTEM SET enable_ls_leader_balance = False TENANT = 'mysql';
References
Enable or disable automatic load balancing: enable_rebalance
Enable or disable automatic log stream transfer: enable_transfer
Enable or disable automatic log stream replica migration: enable_rereplication
For more information about leader rebalancing for log streams, see Intra-tenant balancing.
