Overview
enable_ls_leader_balance specifies whether to enable automatic leader balancing for log streams.
Privilege requirements
Query parameters
The
systenant and all user tenants can use theSHOW PARAMETERSstatement or theGV$OB_PARAMETERSview to query this parameter.Modify parameters
Both the
systenant and user tenants can use theALTER SYSTEM SETstatement to 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. |
Usage instructions
When enable_rebalance is enabled (with a value of
True),enable_ls_leader_balancecan be used to independently control the automatic balancing of log stream leaders.When this parameter is disabled (value is
False), automatic leader switchover does not occur at the log stream level. However, leader switchover may still occur at the partition level due to log stream transfers between leaders with different partitions.
Configuration example
Users can disable automatic leader balancing for log streams of their own tenants.
obclient> ALTER SYSTEM SET enable_ls_leader_balance = False;The system tenant specifies to disable automatic leader balancing for the
mysqltenant's log stream.obclient> ALTER SYSTEM SET enable_ls_leader_balance = False TENANT = 'mysql';
References
Controls whether to enable automatic load balancing: enable_rebalance
Controls whether automatic log stream transfer is allowed: enable_transfer
Total switch for automatic log stream replica migration and replication: enable_rereplication