Note
- For OceanBase Database V4.3.x, this variable was introduced in OceanBase Database V4.3.3.
- For OceanBase Database V4.2.x, this variable was introduced in OceanBase Database V4.2.3.
Purpose
The DBA_OB_LS_REPLICA_TASK_HISTORY view displays the execution history of disaster recovery tasks.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| LS_ID | NUMBER(38) | NO | The ID of the log stream. |
| TASK_TYPE | VARCHAR2(64) | NO | The type of the task. Valid values:
|
| TASK_ID | VARCHAR2(200) | NO | The ID of the task. |
| TASK_STATUS | VARCHAR2(2048) | YES | The status of the task. Valid values:
|
| PRIORITY | CHAR(5) | NO | The priority of the task. Valid values:
|
| TARGET_REPLICA_SVR_IP | VARCHAR2(46) | YES | The IP address of the OBServer node where the destination replica resides. |
| TARGET_REPLICA_SVR_PORT | NUMBER(38) | YES | The port number of the OBServer node where the destination replica resides. |
| TARGET_PAXOS_REPLICA_NUMBER | NUMBER(38) | YES | The quorum of the destination Paxos group of the log stream. |
| TARGET_REPLICA_TYPE | VARCHAR2(16) | YES | The type of the destination replica. |
| SOURCE_REPLICA_SVR_IP | VARCHAR2(46) | YES | The IP address of the OBServer node where the source replica resides. |
| SOURCE_REPLICA_SVR_PORT | NUMBER(38) | YES | The port number of the OBServer node where the source replica resides. |
| SOURCE_PAXOS_REPLICA_NUMBER | NUMBER(38) | YES | The quorum of the source Paxos group of the log stream. |
| SOURCE_REPLICA_TYPE | VARCHAR2(16) | YES | The type of the source replica. |
| DATA_SOURCE_SVR_IP | VARCHAR2(46) | YES | The IP address of the data source. |
| DATA_SOURCE_SVR_PORT | NUMBER(38) | YES | The port number of the data source. |
| IS_MANUAL | CHAR(6) | NO | The source of the task. Value values:
|
| TASK_EXEC_SVR_IP | VARCHAR2(46) | YES | The IP address of the OBServer node where the task is executed. |
| TASK_EXEC_SVR_PORT | NUMBER(38) | YES | The port number of the OBServer node where the task is executed. |
| CREATE_TIME | TIMESTAMP(6) | NO | The time when the task was generated. |
| START_TIME | TIMESTAMP(6) | NO | The time when the task was scheduled. |
| MODIFY_TIME | TIMESTAMP(6) | NO | The time when the task status was updated. |
| FINISH_TIME | TIMESTAMP(6) | NO | The end time of the task. |
| EXECUTE_RESULT | VARCHAR2(2048) | YES | The task execution result. |
| COMMENT | VARCHAR2(2048) | YES | The reason why the task was generated. |
Sample query
obclient [SYS]> SELECT * FROM SYS.DBA_OB_LS_REPLICA_TASK_HISTORY;
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 |
+-------+-----------------------------+------------------------------------+-------------+----------+-----------------------+-------------------------+-----------------------------+---------------------+-----------------------+-------------------------+-----------------------------+---------------------+--------------------+----------------------+-----------+------------------+--------------------+------------------------------+------------------------------+------------------------------+------------------------------+-------------------------------------+------------------------------------+
| 1002 | ADD REPLICA | Y13CE64586BD4-000614A080F90C61-0-0 | COMPLETED | HIGH | xx.xx.xx.xx | 5078 | 5 | FULL | xx.xx.xx.xx | 5070 | 4 | FULL | 0.0.0.0 | 0 | TRUE | xx.xx.xx.xx | 5078 | 27-MAR-24 04.56.35.744416 PM | 27-MAR-24 04.56.32.224829 PM | 27-MAR-24 04.56.35.744416 PM | 27-MAR-24 04.56.35.000000 PM | ret:0, OB_SUCCESS; elapsed:3482196; | add replica by manual |
| 1002 | MIGRATE REPLICA | Y13CE64586BD4-000614A081890C5E-0-0 | COMPLETED | HIGH | xx.xx.xx.xx | 5077 | 4 | FULL | xx.xx.xx.xx | 5076 | 4 | FULL | 0.0.0.0 | 0 | TRUE | xx.xx.xx.xx | 5077 | 27-MAR-24 04.57.10.488799 PM | 27-MAR-24 04.57.06.753924 PM | 27-MAR-24 04.57.10.488799 PM | 27-MAR-24 04.57.10.000000 PM | ret:0, OB_SUCCESS; elapsed:3732851; | migrate replica by manual |
| 1002 | MODIFY PAXOS REPLICA NUMBER | Y13CE64586BD4-000614A081B90C5E-0-0 | COMPLETED | HIGH | xx.xx.xx.xx | 5070 | 3 | NULL | NULL | 0 | 4 | NULL | NULL | NULL | TRUE | xx.xx.xx.xx | 5070 | 27-MAR-24 04.58.12.753859 PM | 27-MAR-24 04.58.12.599322 PM | 27-MAR-24 04.58.12.753859 PM | 27-MAR-24 04.58.12.000000 PM | ret:0, OB_SUCCESS; elapsed:149561; | modify paxos_replica_num by manual |
| 1002 | REMOVE NON PAXOS REPLICA | Y13CE64586BD4-000614A081890C5D-0-0 | COMPLETED | HIGH | xx.xx.xx.xx | 5074 | 4 | READONLY | NULL | 0 | 4 | NULL | NULL | NULL | TRUE | xx.xx.xx.xx | 5070 | 27-MAR-24 04.56.43.937924 PM | 27-MAR-24 04.56.43.864253 PM | 27-MAR-24 04.56.43.937924 PM | 27-MAR-24 04.56.43.000000 PM | ret:0, OB_SUCCESS; elapsed:68493; | remove replica by manual |
| 1002 | REMOVE PAXOS REPLICA | Y13CE64586BD4-000614A074B90E54-0-0 | COMPLETED | HIGH | xx.xx.xx.xx | 5072 | 4 | FULL | NULL | 0 | 4 | NULL | NULL | NULL | FALSE | xx.xx.xx.xx | 5070 | 27-MAR-24 04.57.55.293592 PM | 27-MAR-24 04.57.55.201006 PM | 27-MAR-24 04.57.55.293592 PM | 27-MAR-24 04.57.55.000000 PM | ret:0, OB_SUCCESS; elapsed:89678; | remove permanent offline replica |
| 1002 | TYPE TRANSFORM | Y13CE64586BD4-000614A080F90C62-0-0 | COMPLETED | HIGH | xx.xx.xx.xx | 5074 | 4 | READONLY | xx.xx.xx.xx | 5074 | 5 | FULL | NULL | NULL | TRUE | xx.xx.xx.xx | 5074 | 27-MAR-24 04.56.39.762757 PM | 27-MAR-24 04.56.39.649459 PM | 27-MAR-24 04.56.39.762757 PM | 27-MAR-24 04.56.39.000000 PM | ret:0, OB_SUCCESS; elapsed:99235; | modify replica type by manual |
+-------+-----------------------------+------------------------------------+-------------+----------+-----------------------+-------------------------+-----------------------------+---------------------+-----------------------+-------------------------+-----------------------------+---------------------+--------------------+----------------------+-----------+------------------+--------------------+------------------------------+------------------------------+------------------------------+------------------------------+-------------------------------------+------------------------------------+
6 rows in set (0.06 sec)