Note
This view is introduced since OceanBase Database V4.0.0.
Purpose
The oceanbase.DBA_OB_LS_REPLICA_TASKS view displays the replica-level disaster recovery tasks that are running.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| LS_ID | bigint(20) | NO | The ID of the log stream. |
| TASK_TYPE | varchar(64) | NO | The type of the task. Valid values:
|
| TASK_ID | varchar(200) | NO | The ID of the task. |
| TASK_STATUS | varchar(2048) | YES | The status of the task. Valid value:
|
| PRIORITY | varchar(5) | NO | The priority of the task. Valid values:
|
| TARGET_REPLICA_SVR_IP | varchar(46) | YES | The IP address of the OBServer node where the destination replica resides. |
| TARGET_REPLICA_SVR_PORT | bigint(20) | YES | The port number of the OBServer node where the destination replica resides. |
| TARGET_PAXOS_REPLICA_NUMBER | bigint(20) | YES | The quorum of the destination Paxos group of the log stream. |
| TARGET_REPLICA_TYPE | varchar(16) | YES | The type of the destination replica. |
| SOURCE_REPLICA_SVR_IP | varchar(46) | YES | The IP address of the OBServer node where the source replica resides. For tasks such as deleting replicas and modifying the quorum of the Paxos group, this column is invalid and its value is NULL. |
| SOURCE_REPLICA_SVR_PORT | bigint(20) | YES | The port number of the OBServer node where the source replica resides. For tasks such as deleting replicas and modifying the quorum of the Paxos group, this column is invalid and its value is 0. |
| SOURCE_PAXOS_REPLICA_NUMBER | bigint(20) | YES | The quorum of the source Paxos group of the log stream. |
| SOURCE_REPLICA_TYPE | varchar(16) | YES | The type of the source replica. For tasks such as deleting replicas and modifying the quorum of the Paxos group, this column is invalid and its value is NULL. |
| DATA_SOURCE_SVR_IP | varchar(46) | YES | The IP address of the data source.
Note
|
| DATA_SOURCE_SVR_PORT | bigint(20) | YES | The port number of the data source.
Note
|
| IS_MANUAL | varchar(6) | NO | The source of the task. Value values:
Note
|
| TASK_EXEC_SVR_IP | varchar(46) | YES | The IP address of the OBServer node where the task is executed. |
| TASK_EXEC_SVR_PORT | bigint(20) | YES | The port number of the OBServer node where the task is executed. |
| CREATE_TIME | datetime | NO | The time when the task was generated. |
| START_TIME | datetime | NO | The time when the task was scheduled. |
| MODIFY_TIME | datetime | NO | The time when the task status was updated. |
| COMMENT | varchar(2048) | YES | The reason why the task was generated. |
Sample query
Query the replica-level disaster recovery tasks that are running in the current tenant.
obclient [oceanbase]> SELECT * FROM oceanbase.DBA_OB_LS_REPLICA_TASKS;
The query result is as follows:
+-------+-------------+------------------------------------+-------------+----------+-----------------------+-------------------------+-----------------------------+---------------------+-----------------------+-------------------------+-----------------------------+---------------------+--------------------+----------------------+-----------+------------------+--------------------+---------------------+---------------------+---------------------+-----------------------+
| LS_ID | TASK_TYPE | TASK_ID | TASK_STATUS | PRIORITY | TARGET_REPLICA_SVR_IP | TARGET_REPLICA_SVR_PORT | TARGET_PAXOS_REPLICA_NUMBER | TARGET_REPLICA_TYPE | SOURCE_REPLICA_SVR_IP | SOURCE_REPLICA_SVR_PORT | SOURCE_PAXOS_REPLICA_NUMBER | SOURCE_REPLICA_TYPE | DATA_SOURCE_SVR_IP | DATA_SOURCE_SVR_PORT | IS_MANUAL | TASK_EXEC_SVR_IP | TASK_EXEC_SVR_PORT | CREATE_TIME | START_TIME | MODIFY_TIME | COMMENT |
+-------+-------------+------------------------------------+-------------+----------+-----------------------+-------------------------+-----------------------------+---------------------+-----------------------+-------------------------+-----------------------------+---------------------+--------------------+----------------------+-----------+------------------+--------------------+---------------------+---------------------+---------------------+-----------------------+
| 1 | ADD REPLICA | Y13CE64586BD4-000614A082690C5E-0-0 | INPROGRESS | HIGH | xx.xx.xx.xx | 5078 | 4 | FULL | xx.xx.xx.xx | 5070 | 4 | FULL | 0.0.0.0 | 0 | TRUE | xx.xx.xx.xx | 5078 | 2024-03-27 17:07:28 | 2024-03-27 17:07:28 | 2024-03-27 17:07:28 | add replica by manual |
+-------+-------------+------------------------------------+-------------+----------+-----------------------+-------------------------+-----------------------------+---------------------+-----------------------+-------------------------+-----------------------------+---------------------+--------------------+----------------------+-----------+------------------+--------------------+---------------------+---------------------+---------------------+-----------------------+
1 row in set