Note
This view is available starting with V4.2.1 BP2.
Purpose
The CDB_OB_TRANSFER_PARTITION_TASK_HISTORY view displays the history of executed Transfer Partition tasks for all tenants.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | The ID of the user tenant. |
| TASK_ID | bigint(20) | NO | The unique identifier of the Transfer Partition task. |
| CREATE_TIME | timestamp(6) | NO | The creation time. |
| FINISH_TIME | timestamp(6) | NO | The completion time of the task, including successful and canceled tasks. |
| TABLE_ID | bigint(20) | NO | The ID of the table where the Transfer Partition is located. |
| OBJECT_ID | bigint(20) | NO | The OBJECT_ID of the Transfer Partition. |
| DEST_LS | bigint(20) | NO | The log stream on the destination end. |
| BALANCE_JOB_ID | bigint(20) | NO | The ID of the load balancing job associated with the task execution. |
| TRANSFER_TASK_ID | bigint(20) | NO | The ID of the Transfer task associated with the task execution. |
| STATUS | varchar(64) | NO | The task status. Valid values:
|
| COMMENT | longtext | YES | The comment. |
Sample query
Query the history of executed Transfer Partition tasks for the tenant with ID 1006.
obclient> SELECT * FROM oceanbase.CDB_OB_TRANSFER_PARTITION_TASK_HISTORY WHERE TENANT_ID = 1006;
The query result is as follows:
+-----------+---------+----------------------------+----------------------------+----------+-----------+---------+----------------+------------------+-----------+-------------------------------+
| TENANT_ID | TASK_ID | CREATE_TIME | FINISH_TIME | TABLE_ID | OBJECT_ID | DEST_LS | BALANCE_JOB_ID | TRANSFER_TASK_ID | STATUS | COMMENT |
+-----------+---------+----------------------------+----------------------------+----------+-----------+---------+----------------+------------------+-----------+-------------------------------+
| 1006 | 1 | 2023-11-29 16:02:17.501500 | 2023-11-29 16:03:18.000000 | 500003 | 500009 | 1003 | 17304 | 2 | COMPLETED | Partition transfer to dest LS |
| 1006 | 2 | 2023-11-30 11:04:20.805526 | 2023-11-30 11:59:39.000000 | 500026 | 500026 | 1001 | 377170 | 2952 | COMPLETED | Partition transfer to dest LS |
| 1006 | 3 | 2023-12-01 11:26:43.757677 | 2023-12-01 11:27:26.000000 | 500003 | 500009 | 1001 | 760894 | 2954 | COMPLETED | Partition transfer to dest LS |
+-----------+---------+----------------------------+----------------------------+----------+-----------+---------+----------------+------------------+-----------+-------------------------------+
3 rows in set
References
View the Transfer Partition tasks being processed by all tenants: CDB_OB_TRANSFER_PARTITION_TASKS
For more information about Transfer Partition operations, see the following topics: