Note
This parameter was introduced in V4.2.1.
Description
The enable_transfer parameter specifies whether to allow data transfer within a tenant. This parameter is ineffective when the enable_rebalance parameter is set to false.
Attributes
Attribute |
Description |
|---|---|
| Parameter type | BOOL |
| Default value | True |
| Value range |
|
| Changeable | Yes. You can use the ALTER SYSTEM SET statement to modify it. |
| Restart required | No |
Usage notes
The load balancing strategy within a tenant is jointly controlled by the tenant-level parameters enable_rebalance and enable_transfer.
The enable_rebalance parameter specifies whether to enable load balancing among tenants. In a user tenant, this parameter specifies whether to enable load balancing within the tenant. The default value is true. The setting takes effect immediately without the need to restart 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 the need to restart the OBServer node. The enable_transfer parameter depends on the value of the enable_rebalance parameter:
If
enable_rebalanceis set tofalse, the system does not perform automatic load balancing regardless of whether the value ofenable_transferistrueorfalse. The command to disable all load balancing features is as follows:obclient> ALTER SYSTEM SET enable_rebalance=false;If
enable_rebalanceis set totrueandenable_transferis set totrue, the system automatically adjusts partition distribution during tenant scaling to achieve load balancing. The commands to dynamically adjust the number of log streams in a tenant and automatically perform leader and partition balancing are as follows:obclient> ALTER SYSTEM SET enable_rebalance=true; obclient> ALTER SYSTEM SET enable_transfer=true;If
enable_rebalanceis set totrueandenable_transferis set tofalse, the system cannot initiate transfer operations during tenant scaling, but can implement limited load balancing through log stream migration. The command to perform log stream balancing based on the existing log streams without generating transfers or dynamic changes in the number of log streams is as follows:obclient> ALTER SYSTEM SET enable_rebalance=true; obclient> ALTER SYSTEM SET enable_transfer=false;
Examples
The system tenant configures the load balancing strategy for a specified 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';These statements set the
enable_rebalanceandenable_transferparameters totrueonly for the specified tenant.The system tenant enables intra-tenant load balancing and the transfer feature for all user tenants (excluding the
sysand meta tenants).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;These statements set the
enable_rebalanceandenable_transferparameters totruefor all user tenants.Note
Starting from OceanBase Database V4.2.1,
TENANT = all_userandTENANT = allexpress the same semantics. If you want an operation to take effect on all user tenants, we recommend that you useTENANT = all_user.TENANT = allwill be deprecated.
A user tenant configures the load balancing strategy for the current tenant.
MySQL modeOracle modeYou can execute the following statements to enable intra-tenant load balancing and the transfer feature for a MySQL tenant:
obclient> ALTER SYSTEM SET enable_rebalance = true;obclient> ALTER SYSTEM SET enable_transfer = true;You can execute the following statements to enable intra-tenant load balancing and the transfer feature for an Oracle tenant:
obclient> ALTER SYSTEM SET enable_rebalance = 'true';obclient> ALTER SYSTEM SET enable_transfer = 'true';
