Note
This view is available starting with V4.2.0.
Purpose
This view displays all Transfer tasks currently being executed by all tenants.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | The tenant ID.
|
| TASK_ID | bigint(20) | NO | The ID of the Transfer task. |
| CREATE_TIME | timestamp(6) | NO | The time when the task was created. |
| MODIFY_TIME | timestamp(6) | NO | The time when the information was last updated. |
| SRC_LS | bigint(20) | NO | The log stream on the source end (the log data stream generated by the data source). |
| DEST_LS | bigint(20) | NO | The log stream on the destination end. |
| PART_LIST | longtext | YES | The list of partitions, including user table partitions and global index partitions. |
| PART_COUNT | bigint(20) | YES | The number of partitions in the partition list. |
| NOT_EXIST_PART_LIST | longtext | YES | The list of partitions that were planned to be executed in this task but did not exist when the lock was added. |
| LOCK_CONFLICT_PART_LIST | longtext | YES | The list of partitions that were planned to be executed in this task but experienced lock conflicts when the lock was added. |
| TABLE_LOCK_TABLET_LIST | longtext | YES | The list of tablets for partition-level table locks successfully added when the task entered the START state. This list contains only tablets corresponding to partitions in the PART_LIST. It is used for table lock migration. |
| TABLET_LIST | longtext | YES | The complete list of tablets involved in this Transfer operation. This list includes not only the tablets listed in the PART_LIST but also tablets associated with local index tables and LOB auxiliary tables. |
| TABLET_COUNT | bigint(20) | YES | The number of tablets in the tablet list. |
| START_SCN | bigint(20) unsigned | YES | The SCN when the Transfer operation was initiated. |
| FINISH_SCN | bigint(20) unsigned | YES | The SCN when the Transfer operation was completed. |
| STATUS | varchar(64) | NO | The status of the task.
|
| TRACE_ID | varchar(64) | NO | The full Trace ID of the task. |
| RESULT | bigint(20) | YES | The result of the task. |
| BALANCE_TASK_ID | bigint(20) | NO | The ID of the associated load balancing task. This Transfer task is a subtask generated by the corresponding load balancing task. |
| TABLE_LOCK_OWNER_ID | bigint(20) | YES | When a table lock is added, the system generates an owner_id for each table lock to identify the owner of the lock. When the table lock is released, the corresponding owner_id must be provided to enable the system to correctly identify and release the lock. |
| COMMENT | longtext | YES | The comment. It records the reason for the current stall, diagnostic information, and details of the task failure. |
Sample query
Query the Transfer tasks that are being executed for the tenant with ID 1002.
obclient[oceanbase]> SELECT * FROM oceanbase.CDB_OB_TRANSFER_TASKS WHERE TENANT_ID = 1002\G
The query result is as follows:
*************************** 1. row ***************************
TENANT_ID:1002
TASK_ID: 3
CREATE_TIME: 2024-06-14 14:39:42.356430
MODIFY_TIME: 2024-06-14 14:38:44.315350
SRC_LS: 1002
DEST_LS: 1001
PART_LIST: 500224:500224,500229:500229,500234:500234,500239:500239,500244:500244,500249:500249,500254:500254
PART_COUNT: 7
NOT_EXIST_PART_LIST: NULL
LOCK_CONFLICT_PART_LIST: NULL
TABLE_LOCK_TABLET_LIST: NULL
TABLET_LIST: 200089:0,200090:0,200091:0,200092:0,200093:0,200094:0,200095:0,1152921504606847076:0,1152921504606847077:0,1152921504606847078:0,1152921504606847079:0,1152921504606847080:0,1152921504606847081:0,1152921504606847082:0,1152921504606847083:0,1152921504606847084:0,1152921504606847085:0,1152921504606847086:0,1152921504606847087:0,1152921504606847088:0,1152921504606847089:0,1152921504606847090:0,1152921504606847091:0,1152921504606847092:0,1152921504606847093:0,1152921504606847094:0,1152921504606847095:0,1152921504606847096:0,1152921504606847097:0,1152921504606847098:0,1152921504606847099:0,1152921504606847100:0,1152921504606847101:0,1152921504606847102:0,1152921504606847103:0
TABLET_COUNT: 35
START_SCN: 1718347182784953001
FINISH_SCN: 0
STATUS: DOING
TRACE_ID: YB4*************************-0-0
RESULT: 0
BALANCE_TASK_ID: 374414
TABLE_LOCK_OWNER_ID: 374434
COMMENT:
1 row in set
References
Query the history of all tenants' Tablet-level load balancing tasks (Task): CDB_OB_TRANSFER_TASK_HISTORY
Query all tenants' log stream-level load balancing jobs (Job):
Query all tenants' log stream-level load balancing tasks (Task):
Query all tenants' Transfer partition tasks (Task):
For more information about data load balancing, see Data load balancing.