Note
- This view is available starting with V4.3.3 in V4.3.x.
- This view is available starting with V4.2.3 in V4.2.x.
Purpose
The DBA_OB_LS_REPLICA_TASK_HISTORY view displays the execution history of disaster recovery tasks for the current tenant.
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 values:
|
| PRIORITY | varchar(5) | NO | The priority of the task. Valid values:
|
| TARGET_REPLICA_SVR_IP | varchar(46) | YES | The IP address of the server where the target replica resides. |
| TARGET_REPLICA_SVR_PORT | bigint(20) | YES | The port number of the server where the target replica resides. |
| TARGET_PAXOS_REPLICA_NUMBER | bigint(20) | YES | The number of required Paxos member replicas for the log stream. |
| TARGET_REPLICA_TYPE | varchar(16) | YES | The type of the target replica. |
| SOURCE_REPLICA_SVR_IP | varchar(46) | YES | The IP address of the server where the source replica resides. |
| SOURCE_REPLICA_SVR_PORT | bigint(20) | YES | The port number of the server where the source replica resides. |
| SOURCE_PAXOS_REPLICA_NUMBER | bigint(20) | YES | The number of required Paxos member replicas for the log stream. |
| SOURCE_REPLICA_TYPE | varchar(16) | YES | The type of the source replica. |
| DATA_SOURCE_SVR_IP | varchar(46) | YES | The IP address of the data source. |
| DATA_SOURCE_SVR_PORT | bigint(20) | YES | The port number of the data source. |
| IS_MANUAL | varchar(6) | NO | The source of the disaster recovery task. Valid values:
|
| TASK_EXEC_SVR_IP | varchar(46) | YES | The IP address of the server where the task is executed. |
| TASK_EXEC_SVR_PORT | bigint(20) | YES | The port number of the server where the task is executed. |
| CREATE_TIME | datetime | NO | The time when the task is generated. |
| START_TIME | datetime | NO | The time when the task is scheduled. |
| MODIFY_TIME | datetime | NO | The time when the status of the task is updated. |
| FINISH_TIME | datetime | NO | The end time of the task. |
| EXECUTE_RESULT | varchar(2048) | YES | The execution result of the task. |
| COMMENT | varchar(2048) | YES | The remarks about the reason for generating the task. |
| CONFIG_VERSION | varchar(128) | YES | The config_version information of the clog layer when the disaster recovery task is executed.
NoteThis column is available starting with V4.4.0. |
Sample query
Query the execution history of disaster recovery tasks and display the first two records.
obclient [oceanbase]> SELECT * FROM oceanbase.DBA_OB_LS_REPLICA_TASK_HISTORY LIMIT 2\G
The query result is as follows:
*************************** 1. row ***************************
TENANT_ID: 1
LS_ID: 1
TASK_TYPE: REMOVE PAXOS REPLICA
TASK_ID: YB42AC1E87D7-000639016D9D8D27-0-0
TASK_STATUS: COMPLETED
PRIORITY: HIGH
TARGET_REPLICA_SVR_IP: 172.xx.xxx.231
TARGET_REPLICA_SVR_PORT: 2882
TARGET_PAXOS_REPLICA_NUMBER: 2
TARGET_REPLICA_TYPE: FULL
SOURCE_REPLICA_SVR_IP: NULL
SOURCE_REPLICA_SVR_PORT: 0
SOURCE_PAXOS_REPLICA_NUMBER: 3
SOURCE_REPLICA_TYPE: NULL
DATA_SOURCE_SVR_IP: NULL
DATA_SOURCE_SVR_PORT: NULL
IS_MANUAL: FALSE
TASK_EXEC_SVR_IP: 172.xx.xxx.215
TASK_EXEC_SVR_PORT: 2882
CREATE_TIME: 2025-07-10 11:49:09
START_TIME: 2025-07-10 11:49:09
MODIFY_TIME: 2025-07-10 11:49:09
FINISH_TIME: 2025-07-10 11:49:09
EXECUTE_RESULT: ret:0, OB_SUCCESS; elapsed:63526;
COMMENT: remove redundant paxos replica according to locality
CONFIG_VERSION:
1 row in set
References
Query the execution history of disaster recovery tasks for all tenants: CDB_OB_LS_REPLICA_TASK_HISTORY
Query the running disaster recovery tasks for all tenants: CDB_OB_LS_REPLICA_TASKS
Query the running disaster recovery tasks for the current tenant: DBA_OB_LS_REPLICA_TASKS