This topic describes how to migrate replicas. After you migrate replicas within a zone, the locations of the replicas change, but the number of replicas and the types of replicas in the zone remain unchanged. This feature is applicable to OBServer node failure scenarios and load balancing scenarios.
Migrate units
This section describes how to migrate units between OBServer nodes within a single zone. You can migrate log stream replicas of a tenant by migrating units of the tenant.
The following example describes how to migrate the unit with the ID of 1006 in the mq_t1 tenant to another OBServer node in the same zone.
Log in to the
systenant of the cluster as therootuser.obclient -h172.30.xxx.xxx -P2883 -uroot@sys#obdemo -pxxxx -AAccess the database named
oceanbase.obclient>use oceanbase;Query the tenant ID of the
mq_t1tenant.In this example, the tenant ID of the
mq_t1tenant is1004.obclient> SELECT * FROM oceanbase.DBA_OB_TENANTS WHERE TENANT_NAME = 'mq_t1'; +-----------+-------------+-------------+----------------------------+----------------------------+----------------------------------------+------------------------------------------------------------------+-------------------+--------------------+--------+---------------+--------+-------------+-------------------+------------------+---------------------+---------------------+---------------------+---------------------+--------------+----------------------------+ | 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 | +-----------+-------------+-------------+----------------------------+----------------------------+----------------------------------------+------------------------------------------------------------------+-------------------+--------------------+--------+---------------+--------+-------------+-------------------+------------------+---------------------+---------------------+---------------------+---------------------+--------------+----------------------------+ | 1004 | mq_t1 | USER | 2023-01-04 11:57:11.384141 | 2023-01-04 11:57:37.866707 | sa128_obv4_1;sa128_obv4_2 | FULL{1}@sa128_obv4_1, FULL{1}@sa128_obv4_2 | NULL | MYSQL | NORMAL | NO | NO | PRIMARY | NORMAL | 0 | 1684396167132057328 | 1684396167132057328 | 1684396167051160964 | 4611686018427387903 | NOARCHIVELOG | DISABLED | +-----------+-------------+-------------+----------------------------+----------------------------+----------------------------------------+------------------------------------------------------------------+-------------------+--------------------+--------+---------------+--------+-------------+-------------------+------------------+---------------------+---------------------+---------------------+---------------------+--------------+----------------------------+ 1 row in setQuery units of the
mq_t1tenant.In this example, the unit with the ID of
1006is located on the OBServer node with the IP address ofxx.xx.xx.19in thesa128_obv4_3zone.obclient> SELECT * FROM oceanbase.DBA_OB_UNITS WHERE TENANT_ID = 1004; +---------+-----------+--------+------------------+---------------+----------------------------+----------------------------+--------------+------------+----------+---------------------+-----------------------+----------------+----------------+---------+---------+-------------+---------------+----------+----------+-------------+ | 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 | +---------+-----------+--------+------------------+---------------+----------------------------+----------------------------+--------------+------------+----------+---------------------+-----------------------+----------------+----------------+---------+---------+-------------+---------------+----------+----------+-------------+ | 1004 | 1004 | ACTIVE | 1005 | 1002 | 2023-01-04 11:48:36.582413 | 2023-01-04 11:57:11.387383 | sa128_obv4_1 | xx.xx.xx.47 | 2882 | NULL | NULL | NULL | 1006 | 3 | 3 | 12884901888 | 38654705664 | 30000 | 30000 | 3 | | 1005 | 1004 | ACTIVE | 1005 | 1002 | 2023-01-04 11:48:36.591414 | 2023-01-04 11:57:11.388449 | sa128_obv4_2 | xx.xx.xx.81 | 2882 | NULL | NULL | NULL | 1006 | 3 | 3 | 12884901888 | 38654705664 | 30000 | 30000 | 3 | | 1006 | 1004 | ACTIVE | 1005 | 1002 | 2023-01-04 14:13:36.980799 | 2023-01-04 14:13:36.980799 | sa128_obv4_3 | xx.xx.xx.19 | 2882 | NULL | NULL | NULL | 1006 | 3 | 3 | 12884901888 | 38654705664 | 30000 | 30000 | 3 | +---------+-----------+--------+------------------+---------------+----------------------------+----------------------------+--------------+------------+----------+---------------------+-----------------------+----------------+----------------+---------+---------+-------------+---------------+----------+----------+-------------+ 3 rows in setQuery the IP addresses of OBServer nodes in the zone where the unit to be migrated resides.
In this example, the
sa128_obv4_3zone contains two OBServer nodes with the IP addresses ofxx.xx.xx.19andxx.xx.xx.158.obclient> SELECT * FROM oceanbase.DBA_OB_SERVERS; +-------------+----------+----+--------------+----------+-----------------+--------+----------------------------+-----------+-----------------------+----------------------------+----------------------------+-------------------------------------------------------------------------------------------+ | SVR_IP | SVR_PORT | ID | ZONE | SQL_PORT | WITH_ROOTSERVER | STATUS | START_SERVICE_TIME | STOP_TIME | BLOCK_MIGRATE_IN_TIME | CREATE_TIME | MODIFY_TIME | BUILD_VERSION | +-------------+----------+----+--------------+----------+-----------------+--------+----------------------------+-----------+-----------------------+----------------------------+----------------------------+-------------------------------------------------------------------------------------------+ | xx.xx.xx.81 | 2882 | 6 | sa128_obv4_2 | 2881 | NO | ACTIVE | 2022-12-30 16:17:03.173519 | NULL | NULL | 2022-12-30 16:08:04.749100 | 2023-01-04 11:48:36.589270 | 4.0.0.0_101000022022120716-0d7927892ad6d830e28437af099f018b0ad9a322(Dec 7 2022 16:22:15) | | xx.xx.xx.19 | 2882 | 4 | sa128_obv4_3 | 2881 | NO | ACTIVE | 2022-12-30 16:36:35.567437 | NULL | NULL | 2022-12-30 16:08:02.755200 | 2023-01-04 14:13:36.976548 | 4.0.0.0_101000022022120716-0d7927892ad6d830e28437af099f018b0ad9a322(Dec 7 2022 16:22:15) | | xx.xx.xx.158 | 2882 | 3 | sa128_obv4_3 | 2881 | NO | ACTIVE | 2022-12-12 12:42:00.054759 | NULL | NULL | 2022-11-03 15:37:09.530894 | 2022-12-22 14:43:26.717736 | 4.0.0.0_101000022022120716-0d7927892ad6d830e28437af099f018b0ad9a322(Dec 7 2022 16:22:15) | | xx.xx.xx.43 | 2882 | 1 | sa128_obv4_1 | 2881 | NO | ACTIVE | 2022-12-12 12:25:17.555651 | NULL | NULL | 2022-11-03 15:37:08.990683 | 2022-12-12 12:25:18.553763 | 4.0.0.0_101000022022120716-0d7927892ad6d830e28437af099f018b0ad9a322(Dec 7 2022 16:22:15) | | xx.xx.xx.106 | 2882 | 2 | sa128_obv4_2 | 2881 | YES | ACTIVE | 2022-12-12 11:46:37.222980 | NULL | NULL | 2022-11-03 15:37:09.490511 | 2022-12-12 11:47:31.075335 | 4.0.0.0_101000022022120716-0d7927892ad6d830e28437af099f018b0ad9a322(Dec 7 2022 16:22:15) | | xx.xx.xx.47 | 2882 | 5 | sa128_obv4_1 | 2881 | NO | ACTIVE | 2022-12-30 16:25:45.420996 | NULL | NULL | 2022-12-30 16:08:03.928478 | 2023-01-04 11:48:36.578231 | 4.0.0.0_101000022022120716-0d7927892ad6d830e28437af099f018b0ad9a322(Dec 7 2022 16:22:15) | +-------------+----------+----+--------------+----------+-----------------+--------+----------------------------+-----------+-----------------------+----------------------------+----------------------------+-------------------------------------------------------------------------------------------+ 6 rows in setMigrate the unit with the ID of
1006in themq_t1tenant to another OBServer node in the same zone.obclient> ALTER SYSTEM migrate unit = 1006 destination = 'xx.xx.xx.158:2882'; Query OK, 0 rows affectedQuery the status of the unit migration job.
obclient> SELECT * FROM oceanbase.DBA_OB_UNIT_JOBS WHERE JOB_TYPE = 'MIGRATE_UNIT'; +--------+--------------+------------+-------------+----------+----------------------------+----------------------------+-----------+---------+----------+------------+------------+-------------+ | JOB_ID | JOB_TYPE | JOB_STATUS | RESULT_CODE | PROGRESS | START_TIME | MODIFY_TIME | TENANT_ID | UNIT_ID | SQL_TEXT | EXTRA_INFO | RS_SVR_IP | RS_SVR_PORT | +--------+--------------+------------+-------------+----------+----------------------------+----------------------------+-----------+---------+----------+------------+------------+-------------+ | 4 | MIGRATE_UNIT | INPROGRESS | NULL | 0 | 2023-01-04 17:22:02.208219 | 2023-01-04 17:22:02.208219 | 1004 | 1006 | NULL | NULL | xx.xx.xx.106 | 2882 | +--------+--------------+------------+-------------+----------+----------------------------+----------------------------+-----------+---------+----------+------------+------------+-------------+ 1 row in setThe value of
JOB_STATUSin the query result indicates the job status.INPROGRESSindicates that the migration job is in progress, andSUCCESSindicates that the migration job is successful.Query the information of the migrated unit.
obclient> SELECT * FROM oceanbase.DBA_OB_UNITS WHERE UNIT_ID = 1006; +---------+-----------+--------+------------------+---------------+----------------------------+----------------------------+--------------+-------------+----------+---------------------+-----------------------+----------------+----------------+---------+---------+-------------+---------------+----------+----------+-------------+ | 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 | +---------+-----------+--------+------------------+---------------+----------------------------+----------------------------+--------------+-------------+----------+---------------------+-----------------------+----------------+----------------+---------+---------+-------------+---------------+----------+----------+-------------+ | 1006 | 1004 | ACTIVE | 1005 | 1002 | 2023-01-04 14:13:36.980799 | 2023-01-04 17:22:02.210245 | sa128_obv4_3 | xx.xx.xx.158 | 2882 | xx.xx.xx.19 | 2882 | YES | 1006 | 3 | 3 | 12884901888 | 38654705664 | 30000 | 30000 | 3 | +---------+-----------+--------+------------------+---------------+----------------------------+----------------------------+--------------+-------------+----------+---------------------+-----------------------+----------------+----------------+---------+---------+-------------+---------------+----------+----------+-------------+ 3 rows in setThe query result shows that the unit with the ID of
1006has been migrated from the OBServer node with the IP address ofxx.xx.xx.19to the OBServer node with the IP address ofxx.xx.xx.158.
Manually migrate a replica
After you migrate the unit of a replica, the replica position may be different from the unit position. In this case, you can execute the ALTER SYSTEM MIGRATE REPLICA statement to migrate the replica to the specified position.
Limitations
You can migrate log stream replicas of all tenants in the
systenant but migrate only log stream replicas of the current tenant in a user tenant.One log stream of a tenant supports only one replica task at a time, such as a task to add replicas, remove replicas, convert the type of a replica, modify the number of Paxos replicas of a log stream, or migrate replicas.
You can query ongoing replica tasks from the
CDB_OB_LS_REPLICA_TASKSview in thesystenant or from theDBA_OB_LS_REPLICA_TASKSview in a user tenant.You can migrate replicas only within the same zone.
Prerequisites
You have the
ALTER SYSTEMprivilege.You have the
SELECTprivilege on the following views:DBA_OB_TENANTSDBA_OB_LS/CDB_OB_LSGV$OB_UNITSDBA_OB_LS_LOCATIONS/CDB_OB_LS_LOCATIONS
The destination OBServer node has an available unit that does not contain replicas of the log stream.
Procedure
Assume that you have executed the ALTER SYSTEM MIGRATE UNIT = 1003 DESTINATION = '100.xx.xx.002:5072'; statement in a tenant named tenant1 to migrate its unit with the ID of 1003 to OBServer node 100.xx.xxx.002:5072, but the system has not properly migrated the replica due to exceptions. To manually migrate the replica to OBServer node 100.xx.xxx.002:5072, perform the following steps:
Log in to the target tenant.
Here is an example:
obclient -h172.30.xxx.xxx -P2883 -uroot@tenant1#obdemo -pxxxx -AFor more information about how to connect to a database, see Overview (MySQL mode) or Overview (Oracle mode).
Query the tenant ID of the target tenant.
systenantobclient [oceanbase]> SELECT TENANT_NAME,TENANT_ID FROM oceanbase.DBA_OB_TENANTS WHERE TENANT_NAME='tenant1';User tenant
MySQL modeOracle modeExecute the following statement in MySQL mode:
obclient [oceanbase]> SELECT TENANT_NAME,TENANT_ID FROM oceanbase.DBA_OB_TENANTS;Execute the following statement in Oracle mode:
obclient [SYS]> SELECT TENANT_NAME,TENANT_ID FROM SYS.DBA_OB_TENANTS;A sample query result is as follows:
+-------------+-----------+ | TENANT_NAME | TENANT_ID | +-------------+-----------+ | tenant1 | 1002 | +-------------+-----------+ 1 row in setThe query result shows that the tenant ID is
1002.For more information about the fields in the
DBA_OB_TENANTSview, see DBA_OB_TENANTS.
Query all log streams of the target tenant.
systenantobclient [oceanbase]> SELECT * FROM oceanbase.CDB_OB_LS WHERE TENANT_ID=1002;For more information about the fields in the
CDB_OB_LSview, see CDB_OB_LS.User tenant
MySQL modeOracle modeExecute the following statement in MySQL mode:
obclient [oceanbase]> SELECT * FROM oceanbase.DBA_OB_LS;Execute the following statement in Oracle mode:
obclient [SYS]> SELECT * FROM SYS.DBA_OB_LS;A sample query result is as follows:
+-------+--------+--------------+---------------+-------------+---------------------+----------+---------------------+---------------------+-----------+ | LS_ID | STATUS | PRIMARY_ZONE | UNIT_GROUP_ID | LS_GROUP_ID | CREATE_SCN | DROP_SCN | SYNC_SCN | READABLE_SCN | FLAG | +-------+--------+--------------+---------------+-------------+---------------------+----------+---------------------+---------------------+-----------+ | 1 | NORMAL | z1;z2 | 0 | 0 | NULL | NULL | 1712455113896017202 | 1712455113896017202 | | | 1001 | NORMAL | z1;z2 | 1001 | 1001 | 1712125812893680165 | NULL | 1712455113896017202 | 1712455113896017202 | | | 1002 | NORMAL | z1;z2 | 1002 | 1002 | 1712125812908098857 | NULL | 1712455114041323052 | 1712455113540551113 | | | 1003 | NORMAL | z1;z2 | 0 | 0 | 1712125828880850585 | NULL | 1712455113896017202 | 1712455113896017202 | DUPLICATE | +-------+--------+--------------+---------------+-------------+---------------------+----------+---------------------+---------------------+-----------+ 4 rows in setThe query result shows that the
tenant1tenant has log streams1,1001, and1002, as well as broadcast log stream1003.For more information about the fields in the
DBA_OB_LSview, see DBA_OB_LS.
Query units of the target tenant.
systenantobclient [oceanbase]> SELECT * FROM oceanbase.GV$OB_UNITS WHERE TENANT_ID=1002;User tenant
MySQL modeOracle modeExecute the following statement in MySQL mode:
obclient [oceanbase]> SELECT * FROM oceanbase.GV$OB_UNITS;Execute the following statement in Oracle mode:
obclient [SYS]> SELECT * FROM SYS.GV$OB_UNITS;A sample query result is as follows:
+----------------+----------+---------+-----------+------+-----------+----------------+---------+---------+-------------+---------------------+---------------------+-------------+---------------+-----------------+------------------+--------+----------------------------+ | SVR_IP | SVR_PORT | UNIT_ID | TENANT_ID | ZONE | ZONE_TYPE | REGION | MAX_CPU | MIN_CPU | MEMORY_SIZE | MAX_IOPS | MIN_IOPS | IOPS_WEIGHT | LOG_DISK_SIZE | LOG_DISK_IN_USE | DATA_DISK_IN_USE | STATUS | CREATE_TIME | +----------------+----------+---------+-----------+------+-----------+----------------+---------+---------+-------------+---------------------+---------------------+-------------+---------------+-----------------+------------------+--------+----------------------------+ | 100.xx.xxx.012 | 5070 | 1002 | 1002 | z1 | ReadWrite | default_region | 2 | 2 | 1073741824 | 9223372036854775807 | 9223372036854775807 | 2 | 5798205850 | 75552460 | 0 | NORMAL | 2023-11-05 22:03:30.630137 | | 100.xx.xxx.002 | 5072 | 1004 | 1002 | z2 | ReadWrite | default_region | 2 | 2 | 1073741824 | 9223372036854775807 | 9223372036854775807 | 2 | 5798205850 | 75552460 | 0 | NORMAL | 2023-11-05 22:03:30.634915 | | 100.xx.xxx.003 | 5073 | 1003 | 1002 | z2 | ReadWrite | default_region | 2 | 2 | 1073741824 | 9223372036854775807 | 9223372036854775807 | 2 | 5798205850 | 169443835 | 12582912 | NORMAL | 2023-11-05 22:03:30.633004 | | 100.xx.xxx.001 | 5071 | 1001 | 1002 | z1 | ReadWrite | default_region | 2 | 2 | 1073741824 | 9223372036854775807 | 9223372036854775807 | 2 | 5798205850 | 169443835 | 14680064 | NORMAL | 2023-11-05 22:03:30.627247 | | 100.xx.xxx.004 | 5074 | 1006 | 1002 | z3 | ReadWrite | default_region | 2 | 2 | 1073741824 | 9223372036854775807 | 9223372036854775807 | 2 | 5798205850 | 151021679 | 0 | NORMAL | 2023-11-05 22:03:30.638615 | | 100.xx.xxx.005 | 5075 | 1005 | 1002 | z3 | ReadWrite | default_region | 2 | 2 | 1073741824 | 9223372036854775807 | 9223372036854775807 | 2 | 5798205850 | 0 | 0 | NORMAL | 2023-11-05 22:03:30.636885 | +----------------+----------+---------+-----------+------+-----------+----------------+---------+---------+-------------+---------------------+---------------------+-------------+---------------+-----------------+------------------+--------+----------------------------+ 6 rows in setThe query result shows that the tenant has available units on OBServer nodes
100.xx.xxx.012:5070,100.xx.xxx.002:5072,100.xx.xxx.003:5073,100.xx.xxx.001:5071,100.xx.xxx.004:5074, and100.xx.xxx.005:5075, and the unit with the ID of1003resides on OBServer node100.xx.xxx.003:5073.For more information about the fields in the
GV$OB_UNITSview, see GV$OB_UNITS.
Query the replica distribution of log stream
1002based on the obtained log stream information.systenantobclient [oceanbase]> SELECT * FROM oceanbase.CDB_OB_LS_LOCATIONS WHERE LS_ID=1002 AND TENANT_ID=1002;For more information about the fields in the
CDB_OB_LS_LOCATIONSview, see CDB_OB_LS_LOCATIONS.User tenant
MySQL modeOracle modeExecute the following statement in MySQL mode:
obclient [oceanbase]> SELECT * FROM oceanbase.DBA_OB_LS_LOCATIONS WHERE LS_ID=1002;Execute the following statement in Oracle mode:
obclient [SYS]> SELECT * FROM SYS.DBA_OB_LS_LOCATIONS WHERE LS_ID=1002;A sample query result is as follows:
+----------------------------+----------------------------+-------+----------------+----------+----------+------+----------+-------------------------------------------------------------------------------------------------+----------------------+--------------+--------------+---------+ | CREATE_TIME | MODIFY_TIME | LS_ID | SVR_IP | SVR_PORT | SQL_PORT | ZONE | ROLE | MEMBER_LIST | PAXOS_REPLICA_NUMBER | REPLICA_TYPE | LEARNER_LIST | REBUILD | +----------------------------+----------------------------+-------+----------------+----------+----------+------+----------+-------------------------------------------------------------------------------------------------+----------------------+--------------+--------------+---------+ | 2023-11-05 23:52:15.716363 | 2023-11-05 23:52:24.212243 | 1002 | 100.xx.xxx.003 | 5073 | 5107 | z2 | LEADER | 100.xx.xxx.003:5073:1699199535653021,100.xx.xxx.012:5070:1,100.xx.xxx.004:5074:1699194477097063 | 3 | FULL | | FALSE | | 2023-11-05 22:05:20.420160 | 2023-11-05 23:52:24.807711 | 1002 | 100.xx.xxx.012 | 5070 | 5105 | z1 | FOLLOWER | NULL | NULL | FULL | | FALSE | | 2023-11-05 22:27:57.157395 | 2023-11-05 23:52:24.361105 | 1002 | 100.xx.xxx.004 | 5074 | 5109 | z3 | FOLLOWER | NULL | NULL | FULL | | FALSE | +----------------------------+----------------------------+-------+----------------+----------+----------+------+----------+-------------------------------------------------------------------------------------------------+----------------------+--------------+--------------+---------+ 3 rows in setThe query result shows that the replica on OBServer node
100.xx.xxx.003:5073needs to be migrated and that the replica resides in zonez2. You can find an available unit in the same zone based on the units queried in the previous step. In this example, you can migrate the replica to OBServer node100.xx.xxx.002:5072.
Execute the
ALTER SYSTEM MIGRATE REPLICAstatement to migrate the replica.The syntax is as follows:
ALTER SYSTEM MIGRATE REPLICA LS [=] ls_id SOURCE [=] 'svr_ip:svr_port' DESTINATION [=] 'destination_ip:destination_port' [DATA_SOURCE [=] 'data_source'] [TENANT [=] 'tenant_name']The parameters in the syntax are described as follows:
ls_id: the ID of the log stream for which you want to migrate the replica.svr_ip:svr_port: the IP address and port number of the OBServer node from which you want to migrate the replica, for example,100.xx.xxx.003:5073.destination_ip:destination_port: the IP address and port number of the OBServer node to which you want to migrate the replica, for example,100.xx.xxx.002:5072.data_source: the data source of the replica that you want to migrate. You can select any other replica of the log stream as the data source based on your business needs, for example,100.xx.xxx.004:5074.If the specified data source is unavailable, the system will return an error. If this parameter is not specified, the system automatically selects an available data source.
tenant_name: the name of the target tenant. You can specify another tenant in thesystenant and specify only the current tenant in a user tenant. If this parameter is not specified, the name of the current tenant is used. You cannot use theall,all_user, orall_metaoption in this statement to specify all tenants, all user tenants, or all meta tenants.This statement migrates only one replica at a time. To migrate multiple replicas, you must execute this statement multiple times.
Here is an example:
obclient> ALTER SYSTEM MIGRATE REPLICA LS = 1002 SOURCE='100.xx.xxx.003:5073' DESTINATION = '100.xx.xxx.002:5072'Query the replica distribution of the log stream again.
systenantobclient [oceanbase]> SELECT * FROM oceanbase.CDB_OB_LS_LOCATIONS WHERE LS_ID=1002 AND TENANT_ID=1002;User tenant
MySQL modeOracle modeExecute the following statement in MySQL mode:
obclient [oceanbase]> SELECT * FROM oceanbase.DBA_OB_LS_LOCATIONS WHERE LS_ID=1002;Execute the following statement in Oracle mode:
obclient [SYS]> SELECT * FROM SYS.DBA_OB_LS_LOCATIONS WHERE LS_ID=1002;A sample query result is as follows:
+----------------------------+----------------------------+-------+----------------+----------+----------+------+----------+-------------------------------------------------------------------------------------------------+----------------------+--------------+--------------+---------+ | CREATE_TIME | MODIFY_TIME | LS_ID | SVR_IP | SVR_PORT | SQL_PORT | ZONE | ROLE | MEMBER_LIST | PAXOS_REPLICA_NUMBER | REPLICA_TYPE | LEARNER_LIST | REBUILD | +----------------------------+----------------------------+-------+----------------+----------+----------+------+----------+-------------------------------------------------------------------------------------------------+----------------------+--------------+--------------+---------+ | 2023-11-06 00:05:39.520972 | 2023-11-06 00:05:49.101503 | 1002 | 100.xx.xxx.002 | 5072 | 5106 | z2 | LEADER | 100.xx.xxx.002:5072:1699200339454143,100.xx.xxx.012:5070:1,100.xx.xxx.004:5074:1699194477097063 | 3 | FULL | | FALSE | | 2023-11-05 22:05:20.420160 | 2023-11-06 00:05:50.037494 | 1002 | 100.xx.xxx.012 | 5070 | 5105 | z1 | FOLLOWER | NULL | NULL | FULL | | FALSE | | 2023-11-05 22:27:57.157395 | 2023-11-06 00:05:49.484669 | 1002 | 100.xx.xxx.004 | 5074 | 5109 | z3 | FOLLOWER | NULL | NULL | FULL | | FALSE | +----------------------------+----------------------------+-------+----------------+----------+----------+------+----------+-------------------------------------------------------------------------------------------------+----------------------+--------------+--------------+---------+ 3 rows in setThe query result shows that the replica of log stream
1002on OBServer node100.xx.xxx.003:5073has been migrated to OBServer node100.xx.xxx.002:5072.