Note
This view is available starting with V4.2.0.
Overview
Displays the history of load balancing tasks executed by all tenants.
Columns
Column |
Type |
Is NULL |
Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | Tenant ID.
|
| TASK_ID | bigint(20) | NO | Load balancing task ID |
| CREATE_TIME | timestamp(6) | NO | Task Start Time |
| FINISH_TIME | timestamp(6) | NO | Task completion time, including success and cancellation times |
| TASK_TYPE | varchar(64) | NO | The task type.
|
| SRC_LS | bigint(20) | NO | Source log stream (the log data stream generated by the data source) |
| DEST_LS | bigint(20) | NO | Destination log stream |
| PART_LIST | longtext | YES | Partition list, including: user table partitions and global index partitions |
| FINISHED_PART_LIST | longtext | YES | List of Partitions That Have Completed Load Balancing |
| PART_COUNT | bigint(20) | YES | Number of Partitions in the Partition List |
| FINISHED_PART_COUNT | bigint(20) | YES | Number of Partitions with Balancing Completed |
| LS_GROUP_ID | bigint(20) | NO | Log Stream Group ID |
| STATUS | varchar(64) | NO | Task Status
|
| PARENT_LIST | varchar(1024) | YES | Parent Task List |
| CHILD_LIST | varchar(1024) | YES | Subtask List |
| CURRENT_TRANSFER_TASK_ID | bigint(20) | NO | The ID of the transfer task triggered by the current load balancing task. |
| JOB_ID | bigint(20) | NO | Job ID of the current task |
| COMMENT | longtext | YES | Comments |
| BALANCE_STRATEGY | varchar(64) | YES | The balancing strategy corresponding to the balance task:
NoteFor V4.2.x, this field is available starting from V4.2.4; for V4.3.x, it is available starting from V4.3.2. |
Sample query
View the history of load balancing tasks executed by all tenants.
obclient [oceanbase]> SELECT * FROM oceanbase.CDB_OB_BALANCE_TASK_HISTORY\G
The query result is as follows:
*************************** 1. row ***************************
TENANT_ID: 1002
TASK_ID: 318280
CREATE_TIME: 2025-05-09 14:29:05.504906
FINISH_TIME: 2025-05-09 14:29:13.589729
TASK_TYPE: LS_SPLIT
SRC_LS: 1001
DEST_LS: 1002
PART_LIST: NULL
FINISHED_PART_LIST: 500002:500008,500002:500011,500002:500014
PART_COUNT: 0
FINISHED_PART_COUNT: 3
LS_GROUP_ID: 1001
STATUS: COMPLETED
PARENT_LIST: NULL
CHILD_LIST: NULL
CURRENT_TRANSFER_TASK_ID: -1
JOB_ID: 318278
COMMENT: NULL
BALANCE_STRATEGY: LS balance by expand
*************************** 2. row ***************************
TENANT_ID: 1002
TASK_ID: 318454
CREATE_TIME: 2025-05-09 14:29:45.565764
FINISH_TIME: 2025-05-09 14:29:53.633471
TASK_TYPE: LS_MERGE
SRC_LS: 1002
DEST_LS: 1001
PART_LIST: NULL
FINISHED_PART_LIST: 500002:500008,500002:500011,500002:500014
PART_COUNT: 0
FINISHED_PART_COUNT: 3
LS_GROUP_ID: 1001
STATUS: COMPLETED
PARENT_LIST: NULL
CHILD_LIST: NULL
CURRENT_TRANSFER_TASK_ID: -1
JOB_ID: 318453
COMMENT: NULL
BALANCE_STRATEGY: LS balance by shrink
*************************** 3. row ***************************
TENANT_ID: 1002
TASK_ID: 318539
CREATE_TIME: 2025-05-09 14:30:05.606117
FINISH_TIME: 2025-05-09 14:30:14.069126
TASK_TYPE: LS_SPLIT
SRC_LS: 1001
DEST_LS: 1003
PART_LIST: NULL
FINISHED_PART_LIST: 500002:500008,500002:500011,500002:500014
PART_COUNT: 0
FINISHED_PART_COUNT: 3
LS_GROUP_ID: 1001
STATUS: COMPLETED
PARENT_LIST: NULL
CHILD_LIST: NULL
CURRENT_TRANSFER_TASK_ID: -1
JOB_ID: 318537
COMMENT: NULL
BALANCE_STRATEGY: LS balance by expand
3 rows in set
References
View the current CLB tasks at the log stream level for all tenants: CDB_OB_BALANCE_TASKS
View the load balancing jobs at the log stream level for all tenants:
View load balancing tasks at the tablet level for all tenants:
View all tenant transfer partition tasks:
For more information about data load balancing, see Data load balancing.
