Note
- 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 balancing for log streams.
Privilege requirements
Query the parameter
sysand all user tenants can use theSHOW PARAMETERSstatement or theGV$OB_PARAMETERSview to query this parameter.Modify the parameter
sysand 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 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 balancing for log streams by settingenable_ls_leader_balancetoFalse.When this parameter is disabled (
False), automatic leader switching at the log stream level is disabled, but leader switching at the partition level may still occur 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
mysqluser 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 and replication: enable_rereplication
For more information about leader balancing for log streams, see Intra-tenant balancing.