Note
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 balancing for log streams.
Privilege requirements
Query the parameter
The
systenant and all user tenants can use theSHOW PARAMETERSstatement or theGV$OB_PARAMETERSview to query this parameter.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 (value is
True), you can disable automatic leader balancing for log streams by settingenable_ls_leader_balancetoFalse.When this parameter is disabled (value is
False), automatic leader balancing for log streams is disabled. However, leader transfer may still occur at the partition level due to log stream transfers between different leaders.
Examples
Disable automatic leader balancing for log streams in the user tenant.
obclient> ALTER SYSTEM SET enable_ls_leader_balance = False;Disable automatic leader balancing for log streams in the
mysqltenant in the system tenant.obclient> ALTER SYSTEM SET enable_ls_leader_balance = False TENANT = 'mysql';
References
Control whether to enable automatic load balancing: enable_rebalance
Control whether to allow automatic log stream transfer: enable_transfer
Enable or disable automatic log stream replica migration: enable_rereplication
For more information about leader balancing for log streams, see Intra-tenant balancing.