Overview
enable_transfer specifies whether to allow transfers within a 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 theALTER SYSTEM SETStatement modification. |
| Whether to restart the OBServer node for the change to take effect | No, the setting takes effect immediately. |
Usage instructions
The load balancing strategy within a tenant is jointly controlled by the tenant-level parameters enable_rebalance and enable_transfer.
The enable_rebalance parameter, when set to the system tenant, controls whether load balancing occurs between tenants. When set to a user tenant, it controls whether load balancing occurs within the tenant. The default value is true. After setting, it takes effect immediately without requiring a restart of the OBServer node.
The enable_transfer parameter specifies whether to enable the transfer feature for a tenant. The default value is true. After setting this parameter, it takes effect immediately without restarting the OBServer node. The meaning of the enable_transfer parameter depends on the value of the enable_rebalance parameter:
When the value of the
enable_rebalanceparameter isfalse, the system does not perform automatic load balancing, regardless of whether the value of theenable_transferparameter istrueorfalse. The command to disable all load balancing is as follows:obclient> ALTER SYSTEM SET enable_rebalance=false;When the value of the
enable_rebalanceparameter istrueand the value of theenable_transferparameter istrue, the system automatically adjusts the partition distribution during tenant scaling to achieve load balancing. The command to dynamically adjust the number of log streams for a tenant and automatically balance leaders and partitions within the tenant based on the load balancing algorithm is as follows:obclient> ALTER SYSTEM SET enable_rebalance=true; obclient> ALTER SYSTEM SET enable_transfer=true;When the value of the
enable_rebalanceparameter istrueand the value of theenable_transferparameter isfalse, it means that during tenant scaling operations, the system cannot initiate transfer operations; only limited balancing can be achieved through log stream migration. The command that balances log streams based solely on existing log streams without generating transfers or dynamically changing the number of log streams is as follows:obclient> ALTER SYSTEM SET enable_rebalance=true; obclient> ALTER SYSTEM SET enable_transfer=false;
Configuration example
Set the load balancing strategy for a specified tenant in the sys tenant.
The system tenant enables intra-tenant load balancing and the transfer feature for a specified tenant.
obclient> ALTER SYSTEM SET enable_rebalance = true TENANT = 'tenant_name';obclient> ALTER SYSTEM SET enable_transfer = true TENANT = 'tenant_name';The preceding statement specifies that only the values of the parameters
enable_rebalanceandenable_transferunder the tenant are set totrue.The system tenant enables intra-tenant load balancing and the transfer feature for all user tenants (excluding the
systenant and the Meta tenant).obclient> ALTER SYSTEM SET enable_rebalance = true TENANT = all_user;obclient> ALTER SYSTEM SET enable_transfer = true TENANT = all_user;or
obclient> ALTER SYSTEM SET enable_rebalance = true TENANT = all;obclient> ALTER SYSTEM SET enable_transfer = true TENANT = all;The preceding statement sets the values of the
enable_rebalanceandenable_transferparameters totruefor all user tenants.Note
TENANT = all_userhas the same semantics asTENANT = all. When you need the change to apply to all user tenants, we recommend that you useTENANT = all_user. The latterTENANT = allwill be deprecated in the future.
Users can set the load balancing strategy for their own tenants.
The statement to enable intra-tenant load balancing and the transfer feature for a user tenant is as follows:
obclient> ALTER SYSTEM SET enable_rebalance = true;obclient> ALTER SYSTEM SET enable_transfer = true;