Note
This view is available starting with V4.2.3.
Overview
The DBA_OB_LS_REPLICA_TASK_HISTORY view displays the execution history of disaster recovery tasks.
Columns
Field |
Type |
Nullable |
Description |
|---|---|---|---|
| LS_ID | bigint(20) | NO | Log Stream ID |
| TASK_TYPE | varchar(64) | NO | Task type. Valid values:
|
| TASK_ID | varchar(200) | NO | Task ID |
| TASK_STATUS | varchar(2048) | YES | Task status. Valid values:
|
| PRIORITY | varchar(5) | NO | Task priority. Valid values:
|
| TARGET_REPLICA_SVR_IP | varchar(46) | YES | IP Address of the Server Where the Target Replica Resides |
| TARGET_REPLICA_SVR_PORT | bigint(20) | YES | Port of the server where the target replica resides |
| TARGET_PAXOS_REPLICA_NUMBER | bigint(20) | YES | Quorum Paxos Replica Count for Log Stream Target |
| TARGET_REPLICA_TYPE | varchar(16) | YES | Target Replica Type |
| SOURCE_REPLICA_SVR_IP | varchar(46) | YES | IP Address of the Source Replica Host |
| SOURCE_REPLICA_SVR_PORT | bigint(20) | YES | Port of the server where the source replica resides |
| SOURCE_PAXOS_REPLICA_NUMBER | bigint(20) | YES | Number of Paxos Followers in Log Stream Primary State |
| SOURCE_REPLICA_TYPE | varchar(16) | YES | Source Replica Type |
| DATA_SOURCE_SVR_IP | varchar(46) | YES | Data Source IP |
| DATA_SOURCE_SVR_PORT | bigint(20) | YES | Data Source Port |
| IS_MANUAL | varchar(6) | NO | The source of the disaster recovery task. Valid values:
|
| TASK_EXEC_SVR_IP | varchar(46) | YES | Task Execution Machine IP |
| TASK_EXEC_SVR_PORT | bigint(20) | YES | Task Execution Machine PORT |
| CREATE_TIME | datetime | NO | Task Generation Time |
| START_TIME | datetime | NO | Task Scheduling Time |
| MODIFY_TIME | datetime | NO | Last update time of task status |
| FINISH_TIME | datetime | NO | End Time |
| EXECUTE_RESULT | varchar(2048) | YES | Task execution result |
| COMMENT | varchar(2048) | YES | Reason for Task Generation Remarks |
Sample query
Query the execution history of a disaster recovery task.
obclient [oceanbase]> SELECT * FROM oceanbase.DBA_OB_LS_REPLICA_TASK_HISTORY limit 2;
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 | FINISH_TIME | EXECUTE_RESULT | COMMENT |
+-------+----------------------+------------------------------------+-------------+----------+-----------------------+-------------------------+-----------------------------+---------------------+-----------------------+-------------------------+-----------------------------+---------------------+--------------------+----------------------+-----------+------------------+--------------------+---------------------+---------------------+---------------------+---------------------+-----------------------------------+----------------------------------+
| 1 | REMOVE PAXOS REPLICA | Y13CE64586BD4-000614A074B90E52-0-0 | COMPLETED | HIGH | xx.xx.xx.xx | 5072 | 5 | FULL | NULL | 0 | 5 | NULL | NULL | NULL | FALSE | xx.xx.xx.xx | 5070 | 2024-03-27 16:57:55 | 2024-03-27 16:57:55 | 2024-03-27 16:57:55 | 2024-03-27 16:57:55 | ret:0, OB_SUCCESS; elapsed:87128; | remove permanent offline replica |
+-------+----------------------+------------------------------------+-------------+----------+-----------------------+-------------------------+-----------------------------+---------------------+-----------------------+-------------------------+-----------------------------+---------------------+--------------------+----------------------+-----------+------------------+--------------------+---------------------+---------------------+---------------------+---------------------+-----------------------------------+----------------------------------+
1 row in set (0.05 sec)
References
View the execution history of all tenant disaster recovery tasks: CDB_OB_LS_REPLICA_TASK_HISTORY
View all ongoing disaster recovery tasks for all tenants: CDB_OB_LS_REPLICA_TASKS
View the disaster recovery tasks currently running for the current tenant: DBA_OB_LS_REPLICA_TASKS
