Note
This view is available starting with V4.2.0.
Overview
The CDB_OB_BALANCE_JOBS view displays the load balancing jobs currently in progress for all tenants. Each tenant can only have one load balancing job running at a time. Each load balancing job generates multiple load balancing tasks to perform specific load balancing operations.
Columns
Column |
Type |
Is NULL |
Description |
|---|---|---|---|
| TENANT_ID | bigint(20) | NO | Tenant ID
|
| JOB_ID | bigint(20) | NO | CLB Work ID |
| CREATE_TIME | timestamp(6) | NO | Created At |
| MODIFY_TIME | timestamp(6) | NO | Information Update Time |
| BALANCE_STRATEGY | varchar(64) | NO | Balancing Strategy Name:
|
| JOB_TYPE | varchar(64) | NO | Task type. Valid values:
|
| TARGET_UNIT_NUM | bigint(20) | NO | Number of Units in Each Zone Where Target Changes
NoteFor version V4.2.5, the value of this field has been changed to always be |
| TARGET_PRIMARY_ZONE_NUM | bigint(20) | NO | Number of Changed Primary Zones |
| STATUS | varchar(64) | NO | Task status
|
| COMMENT | longtext | YES | Comments |
| MAX_END_TIME | timestamp(6) | YES | Maximum End Time of Load Balancing Task
NoteFor V4.2.x, this field is available starting from V4.2.4. For V4.3.x, this view is available starting from V4.3.4. |
| ZONE_UNIT_NUM_LIST | varchar(4096) | NO | Number of Units in Each Zone of Tenant
NoteThis field is available starting from V4.2.5 BP5 for version V4.2.5. |
| PARAMETER_LIST | longtext | NO | Load balancing related parameters
NoteFor V4.2.5, this field is available starting from V4.2.5 BP5. |
Sample query
View the current load balancing tasks being executed by all tenants.
obclient [oceanbase]> SELECT * FROM oceanbase.CDB_OB_BALANCE_JOBS;
The query result is as follows:
+-----------+---------+----------------------------+----------------------------+------------------------+------------+-----------------+-------------------------+--------+---------+--------------+--------------------+----------------------------------------------------------------------------------------------+
| TENANT_ID | JOB_ID | CREATE_TIME | MODIFY_TIME | BALANCE_STRATEGY | JOB_TYPE | TARGET_UNIT_NUM | TARGET_PRIMARY_ZONE_NUM | STATUS | COMMENT | MAX_END_TIME | ZONE_UNIT_NUM_LIST | PARAMETER_LIST |
+-----------+---------+----------------------------+----------------------------+------------------------+------------+-----------------+-------------------------+--------+---------+--------------+--------------------+----------------------------------------------------------------------------------------------+
| 1008 | 6083968 | 2025-06-16 17:23:18.070731 | 2025-06-16 17:23:18.070731 | LS group count balance | LS_BALANCE | NULL | 2 | DOING | NULL | NULL | z1:2,z2:2,z3:3 | ls_scale_out_factor:1,enable_rebalance:true,enable_transfer:true,enable_gts_standalone:false |
+-----------+---------+----------------------------+----------------------------+------------------------+------------+-----------------+-------------------------+--------+---------+--------------+--------------------+----------------------------------------------------------------------------------------------+
1 row in set
References
View the historical load balancing job information at the log stream level for all tenants: CDB_OB_BALANCE_JOB_HISTORY
View all tenant log stream-level load balancing tasks:
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.
