Note
For V4.2.1, 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 this parameter, you do not need to restart OBServer nodes. 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 this parameter, you do not need to restart OBServer nodes. The setting takes effect immediately. The meaning of the value 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 disabled regardless of the value of theenable_transferparameter. The following command disables all load balancing:obclient> ALTER SYSTEM SET enable_rebalance=false;If the value of the
enable_rebalanceparameter istrueand the value of theenable_transferparameter istrue, the system automatically adjusts the distribution of partitions during tenant scaling operations to achieve load balancing. The following command dynamically adjusts the number of log streams based on the load balancing algorithm, automatically performs leader balancing 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, the system cannot initiate Transfer operations during tenant scaling operations. It can only perform limited load balancing through log stream migration. The following command performs log stream balancing based on existing log streams without initiating Transfer operations or dynamically adjusting 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 the Transfer feature 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 values of the
enable_rebalanceandenable_transferparameters totruefor the specified tenant.Enable tenant-level load balancing and the Transfer feature 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 values of 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 apply the settings to 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 in a user tenant.
MySQL-compatible modeOracle-compatible modeThe following statements enable tenant-level load balancing and the Transfer feature within the current MySQL-compatible tenant:
obclient> ALTER SYSTEM SET enable_rebalance = true;obclient> ALTER SYSTEM SET enable_transfer = true;The following statements enable tenant-level load balancing and the Transfer feature within the current Oracle-compatible tenant:
obclient> ALTER SYSTEM SET enable_rebalance = 'true';obclient> ALTER SYSTEM SET enable_transfer = 'true';