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 query this parameter by using theSHOW PARAMETERSstatement or theGV$OB_PARAMETERSview.Modify the parameter
The
systenant and user tenants can modify this parameter.
Attributes
| Attribute | Description |
|---|---|
| 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 is used to control 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. The setting takes effect immediately without requiring a restart of the OBServer node.
The enable_transfer parameter specifies whether to enable the Transfer feature within a tenant. The default value is true. The setting takes effect immediately without requiring a restart of the OBServer node. The meaning of the value 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 automatically perform load balancing, regardless of whether the value of theenable_transferparameter istrueorfalse. To disable all load balancing, run the following commands:obclient> ALTER SYSTEM SET enable_rebalance=false;When the values of both the
enable_rebalanceandenable_transferparameters aretrue, the system automatically adjusts the distribution of partitions during tenant scaling operations to achieve load balancing. It dynamically adjusts the number of log streams based on the load balancing algorithm and automatically performs leader and partition balancing within the tenant. To achieve this, run the following commands: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, the system cannot initiate Transfer operations during tenant scaling. It can only achieve limited load balancing through log stream migration. It performs log stream balancing based on the existing log streams without initiating Transfer operations or dynamically changing the number of log streams. To achieve this, run the following commands: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 tenant 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 statements specify that the values of the
enable_rebalanceandenable_transferparameters for the specified tenant aretrue.Enable tenant-level load balancing and the Transfer feature within the tenant 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 statements specify that the values of the
enable_rebalanceandenable_transferparameters for all user tenants aretrue.Note
Starting from V4.2.1, OceanBase Database treats
TENANT = all_userandTENANT = allas equivalent. To apply the setting to all user tenants, we recommend that you useTENANT = all_user. TheTENANT = alloption will be deprecated in later versions.
Set the load balancing strategy for the current tenant in a user tenant.
MySQL modeOracle modeTo enable tenant-level load balancing and the Transfer feature within the tenant in a MySQL tenant, run the following commands:
obclient> ALTER SYSTEM SET enable_rebalance = true;obclient> ALTER SYSTEM SET enable_transfer = true;To enable tenant-level load balancing and the Transfer feature within the tenant in an Oracle tenant, run the following commands:
obclient> ALTER SYSTEM SET enable_rebalance = 'true';obclient> ALTER SYSTEM SET enable_transfer = 'true';
