Tenant scaling aims to improve or reduce the service capabilities of the tenant, including the computing and storage capacities. To meet this purpose, you can improve the service capabilities of a single node or add service nodes. This topic describes how to modify the number of resource units to increase or decrease service nodes to improve or reduce the overall service capabilities of a tenant, thereby implementing tenant scaling.
You can increase or decrease the number of resource units. OceanBase Database requires that all zones within a tenant have the same number of resource units in V4.0.0 and later. To facilitate resource unit management, the system introduces the unit group mechanism. Resource units in different zones can be classified into the same unit group. The resource units in a single unit group share the same unit group ID. Increasing or decreasing the number of resource units is to create or delete resource units based on unit groups.
Prerequisites
Before you perform a scale-in or scale-out operation on a tenant, you must perform the following steps:
Enable load balancing for the tenant.
The load balancing strategy for a tenant is jointly controlled by the tenant-level parameters
enable_rebalanceandenable_transfer.You can specify the
enable_rebalanceparameter in the sys tenant to control whether to enable load balancing among tenants, and specify this parameter in a user tenant to control whether to enable load balancing for the current tenant. The default value istrue. The setting takes effect immediately without the need to restart the OBServer node.You can specify the
enable_transferparameter to control whether to enable the transfer feature for a tenant. The default value istrue. The setting takes effect immediately without the need to restart the OBServer node. The following shows more details:If
enable_rebalanceis set tofalse, the system does not perform automatic load balancing regardless of whetherenable_transferis set totrueorfalse.If
enable_rebalanceandenable_transferare both set totrue, the system automatically adjusts partition distribution to achieve load balancing during a tenant scaling operation.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.
You can enable load balancing for a tenant in the following ways:
Enable load balancing for a specified tenant from the sys tenant
Enable load balancing and the transfer feature for a specified tenant from the sys tenant
ALTER SYSTEM SET enable_rebalance = true TENANT = 'tenant_name';ALTER SYSTEM SET enable_transfer = true TENANT = 'tenant_name';These statements only set the values of the
enable_rebalanceandenable_transferparameters totruefor the specified user tenant.Enable intra-tenant load balancing and the transfer feature for all user tenants from the sys tenant
ALTER SYSTEM SET enable_rebalance = true TENANT = all_user;ALTER SYSTEM SET enable_transfer = true TENANT = all_user;or
ALTER SYSTEM SET enable_rebalance = true TENANT = all;ALTER SYSTEM SET enable_transfer = true TENANT = all;These statements only set the values of the
enable_rebalanceandenable_transferparameters totruefor all user tenants.
Note
In OceanBase Database V4.2.1 and later, the
TENANT = all_userandTENANT = allsettings express 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.Enable load balancing for a user tenant from the current tenant
MySQL modeOracle modeYou can execute the following statements to enable load balancing and the transfer feature for the current MySQL tenant:
ALTER SYSTEM SET enable_rebalance = true;ALTER SYSTEM SET enable_transfer = true;You can execute the following statements to enable load balancing and the transfer feature for the current Oracle tenant:
ALTER SYSTEM SET enable_rebalance = 'true';ALTER SYSTEM SET enable_transfer = 'true';For more information about the
enable_rebalanceandenable_transferparameters, see enable_rebalance and enable_transfer, respectively.If the tenant is deleted, drop the resource pool of the tenant to release resources. Resources in an idle resource pool are also considered occupied resources.
For more information about how to drop a resource pool, see Drop a resource pool.
Perform a compaction to release the occupied memory resources.
For more information about how to manually initiate a minor compaction, see Manually initiate a minor compaction.
Increase the number of resource units
The following example describes how to increase the number of resource units for the mysql001 tenant.
Log on to the
systenant of the cluster as therootuser.obclient -h172.30.xxx.xxx -P2883 -uroot@sys#obdemo -pxxxx -AAccess the database named
oceanbase.use oceanbase;View the information about the
mysql001tenant to obtain its tenant ID.SELECT * FROM oceanbase.DBA_OB_TENANTS WHERE TENANT_NAME = 'mysql001';A sample query result is as follows:
+-----------+-------------+-------------+----------------------------+----------------------------+-------------------+---------------------------------------------+-------------------+--------------------+--------+---------------+--------+-------------+-------------------+------------------+---------------------+---------------------+---------------------+---------------------+--------------+----------------------------+----------+------------+-----------+ | TENANT_ID | TENANT_NAME | TENANT_TYPE | CREATE_TIME | MODIFY_TIME | PRIMARY_ZONE | LOCALITY | PREVIOUS_LOCALITY | COMPATIBILITY_MODE | STATUS | IN_RECYCLEBIN | LOCKED | TENANT_ROLE | SWITCHOVER_STATUS | SWITCHOVER_EPOCH | SYNC_SCN | REPLAYABLE_SCN | READABLE_SCN | RECOVERY_UNTIL_SCN | LOG_MODE | ARBITRATION_SERVICE_STATUS | UNIT_NUM | COMPATIBLE | MAX_LS_ID | +-----------+-------------+-------------+----------------------------+----------------------------+-------------------+---------------------------------------------+-------------------+--------------------+--------+---------------+--------+-------------+-------------------+------------------+---------------------+---------------------+---------------------+---------------------+--------------+----------------------------+----------+------------+-----------+ | 1006 | mysql001 | USER | 2023-09-25 17:06:51.025654 | 2023-09-25 17:41:44.412137 | zone1;zone2,zone3 | FULL{1}@zone1, FULL{1}@zone2, FULL{1}@zone3 | NULL | MYSQL | NORMAL | NO | NO | PRIMARY | NORMAL | 0 | 1695637653853887075 | 1695637653853887075 | 1695637653853887075 | 4611686018427387903 | NOARCHIVELOG | DISABLED | 1 | 4.2.1.0 | 1005 | +-----------+-------------+-------------+----------------------------+----------------------------+-------------------+---------------------------------------------+-------------------+--------------------+--------+---------------+--------+-------------+-------------------+------------------+---------------------+---------------------+---------------------+---------------------+--------------+---------------------------- +----------+------------+-----------+ 1 row in setIn the query result, the value of the
UNIT_NUMparameter is1, indicating that the tenant has one resource unit in each zone.View the resource units of the
mysql001tenant.SELECT * FROM oceanbase.DBA_OB_UNITS WHERE TENANT_ID = 1006;A sample query result is as follows:
+---------+-----------+----------+------------------+---------------+----------------------------+----------------------------+-------+----------------+----------+---------------------+-----------------------+----------------+----------------+---------+---------+-------------+---------------+---------------------+---------------------+-------------+ | UNIT_ID | TENANT_ID | STATUS | RESOURCE_POOL_ID | UNIT_GROUP_ID | CREATE_TIME | MODIFY_TIME | ZONE | SVR_IP | SVR_PORT | MIGRATE_FROM_SVR_IP | MIGRATE_FROM_SVR_PORT | MANUAL_MIGRATE | UNIT_CONFIG_ID | MAX_CPU | MIN_CPU | MEMORY_SIZE | LOG_DISK_SIZE | MAX_IOPS | MIN_IOPS | IOPS_WEIGHT | +---------+-----------+----------+------------------+---------------+----------------------------+----------------------------+-------+----------------+----------+---------------------+-----------------------+----------------+----------------+---------+---------+-------------+---------------+---------------------+---------------------+-------------+ | 1017 | 1006 | ACTIVE | 1003 | 1007 | 2023-09-25 17:06:38.571540 | 2023-09-25 17:06:51.030929 | zone1 | xxx.xx.xxx.198 | 2882 | NULL | NULL | NULL | 1002 | 1 | 1 | 5368709120 | 16106127360 | 9223372036854775807 | 9223372036854775807 | 1 | | 1019 | 1006 | ACTIVE | 1003 | 1007 | 2023-09-25 17:06:38.575723 | 2023-09-25 17:06:51.030929 | zone2 | xxx.xx.xxx.196 | 2882 | NULL | NULL | NULL | 1002 | 1 | 1 | 5368709120 | 16106127360 | 9223372036854775807 | 9223372036854775807 | 1 | | 1021 | 1006 | ACTIVE | 1003 | 1007 | 2023-09-25 17:06:38.581002 | 2023-09-25 17:06:51.031986 | zone3 | xxx.xx.xxx.197 | 2882 | NULL | NULL | NULL | 1002 | 1 | 1 | 5368709120 | 16106127360 | 9223372036854775807 | 9223372036854775807 | 1 | +---------+-----------+----------+------------------+---------------+----------------------------+----------------------------+-------+----------------+----------+---------------------+-----------------------+----------------+----------------+---------+---------+-------------+---------------+---------------------+---------------------+-------------+ 3 rows in setThe query result shows that the
mysql001tenant has one resource unit in each zone, and the three resource units belong to the same unit group.Change the value of
UNIT_NUMto2for themysql001tenant.ALTER RESOURCE TENANT mysql001 UNIT_NUM = 2;View the resource units of the tenant after the modification.
SELECT * FROM oceanbase.DBA_OB_TENANT_JOBS WHERE JOB_TYPE='ALTER_RESOURCE_TENANT_UNIT_NUM' AND TENANT_ID=1006;A sample query result is as follows:
+--------+--------------------------------+------------+-------------+----------+----------------------------+----------------------------+-----------+---------------------------------------------+--------------------+----------------+-------------+ | JOB_ID | JOB_TYPE | JOB_STATUS | RESULT_CODE | PROGRESS | START_TIME | MODIFY_TIME | TENANT_ID | SQL_TEXT | EXTRA_INFO | RS_SVR_IP | RS_SVR_PORT | +--------+--------------------------------+------------+-------------+----------+----------------------------+----------------------------+-----------+---------------------------------------------+--------------------+----------------+-------------+ | 6 | ALTER_RESOURCE_TENANT_UNIT_NUM | SUCCESS | 0 | 100 | 2023-09-25 18:38:05.889876 | 2023-09-25 18:38:25.531461 | 1006 | ALTER RESOURCE TENANT mysql001 UNIT_NUM = 2 | FROM: '1', TO: '2' | xxx.xx.xxx.196 | 2882 | | 7 | ALTER_RESOURCE_TENANT_UNIT_NUM | SUCCESS | 0 | 100 | 2023-09-26 09:37:32.367076 | 2023-09-26 09:39:05.651200 | 1006 | ALTER RESOURCE TENANT mysql001 UNIT_NUM = 1 | FROM: '2', TO: '1' | xxx.xx.xxx.196 | 2882 | | 8 | ALTER_RESOURCE_TENANT_UNIT_NUM | SUCCESS | 0 | 100 | 2023-09-26 09:57:45.028091 | 2023-09-26 09:58:00.412204 | 1006 | ALTER RESOURCE TENANT mysql001 UNIT_NUM = 2 | FROM: '1', TO: '2' | xxx.xx.xxx.196 | 2882 | +--------+--------------------------------+------------+-------------+----------+----------------------------+----------------------------+-----------+---------------------------------------------+--------------------+----------------+-------------+ 6 rows in setIn the query result, find the corresponding task record based on the following fields:
START_TIME: the time when the task was initiated.SQL_TEXT: the SQL statement corresponding to the task.EXTRA_INFO: the number of resource units before and after the change.
If the value of
JOB_STATUSin the corresponding change record isSUCCESS, the task for increasing the number of resource units is successfully executed.For more information about the fields in the
DBA_OB_TENANT_JOBSview, see DBA_OB_TENANT_JOBS.View the resource units of the
mysql001tenant after the modification.SELECT * FROM oceanbase.DBA_OB_UNITS WHERE TENANT_ID = 1006;A sample query result is as follows:
+---------+-----------+--------+------------------+---------------+----------------------------+----------------------------+-------+----------------+----------+---------------------+-----------------------+----------------+----------------+---------+---------+-------------+---------------+---------------------+---------------------+-------------+ | UNIT_ID | TENANT_ID | STATUS | RESOURCE_POOL_ID | UNIT_GROUP_ID | CREATE_TIME | MODIFY_TIME | ZONE | SVR_IP | SVR_PORT | MIGRATE_FROM_SVR_IP | MIGRATE_FROM_SVR_PORT | MANUAL_MIGRATE | UNIT_CONFIG_ID | MAX_CPU | MIN_CPU | MEMORY_SIZE | LOG_DISK_SIZE | MAX_IOPS | MIN_IOPS | IOPS_WEIGHT | +---------+-----------+--------+------------------+---------------+----------------------------+----------------------------+-------+----------------+----------+---------------------+-----------------------+----------------+----------------+---------+---------+-------------+---------------+---------------------+---------------------+-------------+ | 1017 | 1006 | ACTIVE | 1003 | 1007 | 2023-09-25 17:06:38.571540 | 2023-09-25 17:06:51.030929 | zone1 | xxx.xx.xxx.198 | 2882 | NULL | NULL | NULL | 1002 | 1 | 1 | 5368709120 | 16106127360 | 9223372036854775807 | 9223372036854775807 | 1 | | 1019 | 1006 | ACTIVE | 1003 | 1007 | 2023-09-25 17:06:38.575723 | 2023-09-25 17:06:51.030929 | zone2 | xxx.xx.xxx.196 | 2882 | NULL | NULL | NULL | 1002 | 1 | 1 | 5368709120 | 16106127360 | 9223372036854775807 | 9223372036854775807 | 1 | | 1021 | 1006 | ACTIVE | 1003 | 1007 | 2023-09-25 17:06:38.581002 | 2023-09-26 09:39:59.321198 | zone3 | xxx.xx.xxx.204 | 2882 | NULL | NULL | NULL | 1002 | 1 | 1 | 5368709120 | 16106127360 | 9223372036854775807 | 9223372036854775807 | 1 | | 1028 | 1006 | ACTIVE | 1003 | 1010 | 2023-09-26 09:57:45.029620 | 2023-09-26 09:57:45.029620 | zone1 | xxx.xx.xxx.194 | 2882 | NULL | NULL | NULL | 1002 | 1 | 1 | 5368709120 | 16106127360 | 9223372036854775807 | 9223372036854775807 | 1 | | 1029 | 1006 | ACTIVE | 1003 | 1010 | 2023-09-26 09:57:45.031734 | 2023-09-26 09:57:45.031734 | zone2 | xxx.xx.xxx.192 | 2882 | NULL | NULL | NULL | 1002 | 1 | 1 | 5368709120 | 16106127360 | 9223372036854775807 | 9223372036854775807 | 1 | | 1030 | 1006 | ACTIVE | 1003 | 1010 | 2023-09-26 09:57:45.033851 | 2023-09-26 09:57:45.033851 | zone3 | xxx.xx.xxx.197 | 2882 | NULL | NULL | NULL | 1002 | 1 | 1 | 5368709120 | 16106127360 | 9223372036854775807 | 9223372036854775807 | 1 | +---------+-----------+--------+------------------+---------------+----------------------------+----------------------------+-------+----------------+----------+---------------------+-----------------------+----------------+----------------+---------+---------+-------------+---------------+---------------------+---------------------+-------------+ 6 rows in set
The query result shows that the number of resource units in each zone is changed from 1 to 2 for the mysql001 tenant. The tenant has one resource unit in each zone before the change, and two resource units in each zone after the change.
Decrease the number of resource units
The following example describes how to decrease the number of resource units of the mysql001 tenant.
Log on to the
systenant of the cluster as therootuser.obclient -h172.xxx.xxx.xxx -P2883 -uroot@sys#obdemo -pxxxx -AAccess the database named
oceanbase.use oceanbase;View the information about the
mysql001tenant to obtain its tenant ID.SELECT * FROM oceanbase.DBA_OB_TENANTS WHERE TENANT_NAME = 'mysql001';A sample query result is as follows:
+-----------+-------------+-------------+----------------------------+----------------------------+-------------------+---------------------------------------------+-------------------+--------------------+--------+---------------+--------+-------------+-------------------+------------------+---------------------+---------------------+---------------------+---------------------+--------------+----------------------------+----------+------------+-----------+ | TENANT_ID | TENANT_NAME | TENANT_TYPE | CREATE_TIME | MODIFY_TIME | PRIMARY_ZONE | LOCALITY | PREVIOUS_LOCALITY | COMPATIBILITY_MODE | STATUS | IN_RECYCLEBIN | LOCKED | TENANT_ROLE | SWITCHOVER_STATUS | SWITCHOVER_EPOCH | SYNC_SCN | REPLAYABLE_SCN | READABLE_SCN | RECOVERY_UNTIL_SCN | LOG_MODE | ARBITRATION_SERVICE_STATUS | UNIT_NUM | COMPATIBLE | MAX_LS_ID | +-----------+-------------+-------------+----------------------------+----------------------------+-------------------+---------------------------------------------+-------------------+--------------------+--------+---------------+--------+-------------+-------------------+------------------+---------------------+---------------------+---------------------+---------------------+--------------+----------------------------+----------+------------+-----------+ | 1006 | mysql001 | USER | 2023-09-25 17:06:51.025654 | 2023-09-25 17:41:44.412137 | zone1;zone2,zone3 | FULL{1}@zone1, FULL{1}@zone2, FULL{1}@zone3 | NULL | MYSQL | NORMAL | NO | NO | PRIMARY | NORMAL | 0 | 1695636323100528993 | 1695636323100528993 | 1695636323100528993 | 4611686018427387903 | NOARCHIVELOG | DISABLED | 2 | 4.2.1.0 | 1005 | +-----------+-------------+-------------+----------------------------+----------------------------+-------------------+---------------------------------------------+-------------------+--------------------+--------+---------------+--------+-------------+-------------------+------------------+---------------------+---------------------+---------------------+---------------------+--------------+----------------------------+----------+------------+-----------+ 1 row in setIn the query result, the value of the
UNIT_NUMparameter is2, indicating that the tenant has two resource units in each zone.View the resource units of the
mysql001tenant.SELECT * FROM oceanbase.DBA_OB_UNITS WHERE TENANT_ID = 1006;A sample query result is as follows:
+---------+-----------+--------+------------------+---------------+----------------------------+----------------------------+-------+----------------+----------+---------------------+-----------------------+----------------+----------------+---------+---------+-------------+---------------+---------------------+---------------------+-------------+ | UNIT_ID | TENANT_ID | STATUS | RESOURCE_POOL_ID | UNIT_GROUP_ID | CREATE_TIME | MODIFY_TIME | ZONE | SVR_IP | SVR_PORT | MIGRATE_FROM_SVR_IP | MIGRATE_FROM_SVR_PORT | MANUAL_MIGRATE | UNIT_CONFIG_ID | MAX_CPU | MIN_CPU | MEMORY_SIZE | LOG_DISK_SIZE | MAX_IOPS | MIN_IOPS | IOPS_WEIGHT | +---------+-----------+--------+------------------+---------------+----------------------------+----------------------------+-------+----------------+----------+---------------------+-----------------------+----------------+----------------+---------+---------+-------------+---------------+---------------------+---------------------+-------------+ | 1016 | 1006 | ACTIVE | 1003 | 1006 | 2023-09-25 17:06:38.569419 | 2023-09-25 18:01:30.069547 | zone1 | xxx.xx.xxx.194 | 2882 | NULL | NULL | NULL | 1002 | 1 | 1 | 5368709120 | 16106127360 | 9223372036854775807 | 9223372036854775807 | 1 | | 1017 | 1006 | ACTIVE | 1003 | 1007 | 2023-09-25 17:06:38.571540 | 2023-09-25 17:06:51.030929 | zone1 | xxx.xx.xxx.198 | 2882 | NULL | NULL | NULL | 1002 | 1 | 1 | 5368709120 | 16106127360 | 9223372036854775807 | 9223372036854775807 | 1 | | 1018 | 1006 | ACTIVE | 1003 | 1006 | 2023-09-25 17:06:38.573614 | 2023-09-25 18:01:30.070603 | zone2 | xxx.xx.xxx.192 | 2882 | NULL | NULL | NULL | 1002 | 1 | 1 | 5368709120 | 16106127360 | 9223372036854775807 | 9223372036854775807 | 1 | | 1019 | 1006 | ACTIVE | 1003 | 1007 | 2023-09-25 17:06:38.575723 | 2023-09-25 17:06:51.030929 | zone2 | xxx.xx.xxx.196 | 2882 | NULL | NULL | NULL | 1002 | 1 | 1 | 5368709120 | 16106127360 | 9223372036854775807 | 9223372036854775807 | 1 | | 1020 | 1006 | ACTIVE | 1003 | 1006 | 2023-09-25 17:06:38.579946 | 2023-09-25 18:01:30.070603 | zone3 | xxx.xx.xxx.204 | 2882 | NULL | NULL | NULL | 1002 | 1 | 1 | 5368709120 | 16106127360 | 9223372036854775807 | 9223372036854775807 | 1 | | 1021 | 1006 | ACTIVE | 1003 | 1007 | 2023-09-25 17:06:38.581002 | 2023-09-25 17:06:51.031986 | zone3 | xxx.xx.xxx.197 | 2882 | NULL | NULL | NULL | 1002 | 1 | 1 | 5368709120 | 16106127360 | 9223372036854775807 | 9223372036854775807 | 1 | +---------+-----------+--------+------------------+---------------+----------------------------+----------------------------+-------+----------------+----------+---------------------+-----------------------+----------------+----------------+---------+---------+-------------+---------------+---------------------+---------------------+-------------+ 6 rows in setThe query result shows that the
mysql001tenant has two resource units in each zone. The resource units with the IDs1016,1018, and1020belong to the unit group with the ID1006. The resource units with the IDs1017,1019, and1021belong to the unit group with the ID1007.Change the value of
UNIT_NUMto1for themysql001tenant.Randomly delete a unit group to decrease the number of resource units
ALTER RESOURCE TENANT mysql001 UNIT_NUM = 1;For a scenario where each zone has two resource units, after this statement is executed, the system randomly specifies a unit group, redistributes the data in the unit group to other unit groups, and then deletes the unit group.
Delete a specified unit group to decrease the number of resource units
ALTER RESOURCE TENANT mysql001 UNIT_NUM = 1 DELETE UNIT_GROUP =(1006);For a scenario where each zone has two resource units, after this statement is executed, the system redistributes the data in the specified unit group to other unit groups, and then deletes the unit group.
View the execution status of the task for decreasing the number of resource units.
SELECT * FROM oceanbase.DBA_OB_TENANT_JOBS WHERE JOB_TYPE='ALTER_RESOURCE_TENANT_UNIT_NUM' AND TENANT_ID=1006;A sample query result is as follows:
+--------+--------------------------------+------------+-------------+----------+----------------------------+----------------------------+-----------+---------------------------------------------+--------------------+----------------+-------------+ | JOB_ID | JOB_TYPE | JOB_STATUS | RESULT_CODE | PROGRESS | START_TIME | MODIFY_TIME | TENANT_ID | SQL_TEXT | EXTRA_INFO | RS_SVR_IP | RS_SVR_PORT | +--------+--------------------------------+------------+-------------+----------+----------------------------+----------------------------+-----------+---------------------------------------------+--------------------+----------------+-------------+ | 6 | ALTER_RESOURCE_TENANT_UNIT_NUM | SUCCESS | 0 | 100 | 2023-09-25 18:01:30.069506 | 2023-09-25 18:01:45.068740 | 1006 | ALTER RESOURCE TENANT mysql001 UNIT_NUM = 2 | FROM: '1', TO: '2' | xxx.xx.xxx.196 | 2882 | | 7 | ALTER_RESOURCE_TENANT_UNIT_NUM | SUCCESS | 0 | 100 | 2023-09-26 09:37:32.367076 | 2023-09-26 09:39:05.651200 | 1006 | ALTER RESOURCE TENANT mysql001 UNIT_NUM = 1 | FROM: '2', TO: '1' | xxx.xx.xxx.196 | 2882 | +--------+--------------------------------+------------+-------------+----------+----------------------------+----------------------------+-----------+---------------------------------------------+--------------------+----------------+-------------+ 2 rows in setIn the query result, find the corresponding task record based on the following fields:
START_TIME: the time when the task was initiated.SQL_TEXT: the SQL statement corresponding to the task.EXTRA_INFO: the number of resource units before and after the change.
If the value of
JOB_STATUSisSUCCESSin the corresponding task record, the task for decreasing the number of resource units is successfully executed.For more information about the fields in the
DBA_OB_TENANT_JOBSview, see DBA_OB_TENANT_JOBS.View the resource units of the
mysql001tenant after the modification.SELECT * FROM oceanbase.DBA_OB_UNITS WHERE TENANT_ID = 1006;A sample query result is as follows:
+---------+-----------+----------+------------------+---------------+----------------------------+----------------------------+-------+----------------+----------+---------------------+-----------------------+----------------+----------------+---------+---------+-------------+---------------+---------------------+---------------------+-------------+ | UNIT_ID | TENANT_ID | STATUS | RESOURCE_POOL_ID | UNIT_GROUP_ID | CREATE_TIME | MODIFY_TIME | ZONE | SVR_IP | SVR_PORT | MIGRATE_FROM_SVR_IP | MIGRATE_FROM_SVR_PORT | MANUAL_MIGRATE | UNIT_CONFIG_ID | MAX_CPU | MIN_CPU | MEMORY_SIZE | LOG_DISK_SIZE | MAX_IOPS | MIN_IOPS | IOPS_WEIGHT | +---------+-----------+----------+------------------+---------------+----------------------------+----------------------------+-------+----------------+----------+---------------------+-----------------------+----------------+----------------+---------+---------+-------------+---------------+---------------------+---------------------+-------------+ | 1017 | 1006 | ACTIVE | 1003 | 1007 | 2023-09-25 17:06:38.571540 | 2023-09-25 17:06:51.030929 | zone1 | xxx.xx.xxx.198 | 2882 | NULL | NULL | NULL | 1002 | 1 | 1 | 5368709120 | 16106127360 | 9223372036854775807 | 9223372036854775807 | 1 | | 1019 | 1006 | ACTIVE | 1003 | 1007 | 2023-09-25 17:06:38.575723 | 2023-09-25 17:06:51.030929 | zone2 | xxx.xx.xxx.196 | 2882 | NULL | NULL | NULL | 1002 | 1 | 1 | 5368709120 | 16106127360 | 9223372036854775807 | 9223372036854775807 | 1 | | 1021 | 1006 | ACTIVE | 1003 | 1007 | 2023-09-25 17:06:38.581002 | 2023-09-26 09:39:59.321198 | zone3 | xxx.xx.xxx.197 | 2882 | NULL | NULL | NULL | 1002 | 1 | 1 | 5368709120 | 16106127360 | 9223372036854775807 | 9223372036854775807 | 1 | +---------+-----------+----------+------------------+---------------+----------------------------+----------------------------+-------+----------------+----------+---------------------+-----------------------+----------------+----------------+---------+---------+-------------+---------------+---------------------+---------------------+-------------+ 3 rows in set
The query result shows that the number of resource units in each zone is changed from 2 to 1 for the mysql001 tenant. The tenant has two resource units in each zone before the change, and one resource unit in each zone after the change.