Note
This parameter is available starting with V4.2.1.
Description
enable_transfer specifies whether to allow Transfer operations within a tenant.
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 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
The load balancing strategy within a tenant is jointly controlled by the enable_rebalance and enable_transfer parameters.
The enable_rebalance parameter controls whether to perform load balancing between tenants in the sys tenant and whether to perform load balancing within a tenant in a user tenant. The default value is true. After you set the parameter, you do not need to restart the OBServer node. The setting takes effect immediately.
The enable_transfer parameter specifies whether to enable the Transfer feature within a tenant. The default value is true. After you set the parameter, you do not need to restart the OBServer node. The setting takes effect immediately. The meaning of the enable_transfer parameter depends on the value of the enable_rebalance parameter:
If the value of the
enable_rebalanceparameter isfalse, automatic load balancing is not performed regardless of the value of theenable_transferparameter. The following commands disable all load balancing:obclient> ALTER SYSTEM SET enable_rebalance=false;If the value of the
enable_rebalanceparameter istrueand the value of theenable_transferparameter istrue, automatic load balancing is performed during tenant scaling. The system automatically adjusts the distribution of partitions and dynamically adjusts the number of log streams based on the load balancing algorithm to achieve leader and partition balancing within the tenant. The following commands perform leader and partition balancing within the tenant:obclient> ALTER SYSTEM SET enable_rebalance=true; obclient> ALTER SYSTEM SET enable_transfer=true;If the value of the
enable_rebalanceparameter istrueand the value of theenable_transferparameter isfalse, automatic load balancing is not performed during tenant scaling. The system can only perform limited load balancing by migrating log streams. The following commands perform log stream balancing without initiating Transfer operations or changing the number of log streams:obclient> ALTER SYSTEM SET enable_rebalance=true; obclient> ALTER SYSTEM SET enable_transfer=false;
Examples
Set the load balancing strategy for a specified tenant in the
systenant.Enable tenant-level load balancing and Transfer within the specified tenant in the
systenant.obclient> ALTER SYSTEM SET enable_rebalance = true TENANT = 'tenant_name';obclient> ALTER SYSTEM SET enable_transfer = true TENANT = 'tenant_name';The preceding statements set the
enable_rebalanceandenable_transferparameters totruefor the specified tenant.Enable tenant-level load balancing and Transfer within all user tenants (excluding the
systenant and the Meta tenant) in thesystenant.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 statements set the
enable_rebalanceandenable_transferparameters totruefor all user tenants.Note
Starting from V4.2.1 of OceanBase Database, the
TENANT = all_userandTENANT = allclauses have the same semantics. When you want to set the parameter for all user tenants, we recommend that you use theTENANT = all_userclause. TheTENANT = allclause will be deprecated in the future.
Set the load balancing strategy for the current tenant.
MySQL modeOracle modeThe following statements enable tenant-level load balancing and Transfer within the current MySQL tenant:
obclient> ALTER SYSTEM SET enable_rebalance = true;obclient> ALTER SYSTEM SET enable_transfer = true;The following statements enable tenant-level load balancing and Transfer within the current Oracle tenant:
obclient> ALTER SYSTEM SET enable_rebalance = 'true';obclient> ALTER SYSTEM SET enable_transfer = 'true';