oceanbase 通过调大unit_num进行扩容问题咨询

【 使用环境 】测试环境
【 OB or 其他组件 】OB
【 使用版本 】社区版 4.3.4
【问题描述】扩容后,根据文档指导查看进度,如下:
SELECT * FROM oceanbase.DBA_OB_TENANT_JOBS WHERE JOB_TYPE=‘ALTER_RESOURCE_TENANT_UNIT_NUM’ ;


开始时间是昨天晚上10点多,执行了一晚上,到现在还是进行中状态,请教下怎么排查一下问题,会不会可能已经完成了,视图数据有问题。
附上部分日志:
observer.log (560.6 KB)
rootservice.log (552.7 KB)
trace.log (363.9 KB)

2 个赞

OceanBase 社区xoynun_gaMTk3NTAyODU3NS4xNzI4NjEzODY0_ga_T35KTM57DZ*MTczNDQwMDA3MS4xNjkuMS4xNzM0NDAwMzc2LjU0LjAuMA…
参考这个帖子排查一下呢

1 个赞

用诊断工具obdiag 拿一份巡检报告回来看看:https://www.oceanbase.com/docs/common-obdiag-cn-1000000001768218

2 个赞

查看租户名信息,获取其 TENANT_ID
SELECT * FROM oceanbase.DBA_OB_TENANTS WHERE TENANT_NAME = ‘mysql001’;
根据TENANT_ID查询unit规格信息
SELECT * FROM oceanbase.DBA_OB_UNITS WHERE TENANT_ID = 1006;

1 个赞

看的是已经有了 状态都是 active

1 个赞

业务租户下查询
select * from cdb_ob_balance_jobs where tenant_id=xxxx;
select * from cdb_ob_balance_tasks where tenant_id=xxxx and job_id=xxxx;
select * from CDB_OB_TRANSFER_TASK_HISTORY where tenant_id=xxxx and BALANCE_TASK_ID=xxxx;

select * from dba_ob_server_event_history
where value2=‘Y32520BA2D9BF-00061E7FFDC0FCA7-0-0’; --查看trace_id信息
–查一下资源信息
SELECT ZONE,SVR_IP,SVR_PORT,
CPU_CAPACITY,
CPU_ASSIGNED,
CPU_CAPACITY-CPU_ASSIGNED AS CPU_MIN_FREE,
CPU_CAPACITY_MAX,
CPU_ASSIGNED_MAX,
CPU_CAPACITY_MAX-CPU_ASSIGNED_MAX AS CPU_MAX_FREE,
ROUND(MEMORY_LIMIT/1024/1024/1024,2) AS MEMORY_TOTAL_GB,
ROUND((MEMORY_LIMIT-MEM_CAPACITY)/1024/1024/1024,2) AS SYSTEM_MEMORY_GB,
ROUND(MEM_ASSIGNED/1024/1024/1024,2) AS MEM_ASSIGNED_GB,
ROUND((MEM_CAPACITY-MEM_ASSIGNED)/1024/1024/1024,2) AS MEMORY_FREE_GB,
ROUND(LOG_DISK_CAPACITY/1024/1024/1024,2) AS LOG_DISK_CAPACITY_GB,
ROUND(LOG_DISK_ASSIGNED/1024/1024/1024,2) AS LOG_DISK_ASSIGNED_GB,
ROUND((LOG_DISK_CAPACITY-LOG_DISK_ASSIGNED)/1024/1024/1024,2) AS LOG_DISK_FREE_GB,
ROUND((DATA_DISK_CAPACITY/1024/1024/1024),2) AS DATA_DISK_GB,
ROUND((DATA_DISK_IN_USE/1024/1024/1024),2) AS DATA_DISK_USED_GB,
ROUND((DATA_DISK_CAPACITY-DATA_DISK_IN_USE)/1024/1024/1024,2) AS DATA_DISK_FREE_GB,
round(DATA_DISK_IN_USE/DATA_DISK_CAPACITY,2)*100 as data_disk_used_pct
FROM GV$OB_SERVERS
order by zone,data_disk_used_pct desc;

1 个赞

select * from cdb_ob_balance_jobs where tenant_id=1002;
select * from cdb_ob_balance_tasks where tenant_id=1002;
select * from CDB_OB_TRANSFER_TASK_HISTORY where tenant_id=1002;
以上根据tenant_id查询均无记录

select * from dba_ob_server_event_history
where value2=‘Y32520BA2D9BF-00061E7FFDC0FCA7-0-0’; --查看trace_id信息
根据value2查询没有记录

资源信息为方便查看请见附件
Untitled.txt (998 字节)

好奇怪 history里边也没有数据 两个都没有

业务租户下 查询
select * from oceanbase.dba_OB_BALANCE_JOB_HISTORY ;
select * from oceanbase.dba_OB_BALANCE_TASK_HISTORY;

业务租户查询也是没有数据,我今天重新启动了ob集群,那条进行中的任务还在

查看正在执行的transfer任务
select * From CDB_OB_TRANSFER_TASKS \G;


老师 没有数据

业务租户下查询

确认租户角色及相关配置项

select tenant_id, tenant_role from oceanbase.DBA_OB_TENANTS;
select * from oceanbase.GV$OB_PARAMETERS where tenant_id =1002 and name in (“enable_rebalance”, “balancer_idle_time”, “partition_balance_schedule_interval”);

select * from _all_virtual_tenant_parameter_info where tenant_id =1002 and name in (“enable_rebalance”, “balancer_idle_time”, “partition_balance_schedule_interval”);
注意字符的转译

业务租户下无DBA_OB_TENANT_JOBS视图

select tenant_id, tenant_role from oceanbase.DBA_OB_TENANTS;
image

select * from oceanbase.GV$OB_PARAMETERS where tenant_id =1002 and name in (“enable_rebalance”, “balancer_idle_time”, “partition_balance_schedule_interval”);

select * from _all_virtual_tenant_parameter_info where tenant_id =1002 and name in (“enable_rebalance”, “balancer_idle_time”, “partition_balance_schedule_interval”);
系统租户下无_all_virtual_tenant_parameter_info视图

系统租户下 查看一下
select * From CDB_OB_TRANSFER_TASKS where tenant_id=1002;

无记录。

目前我缩容回unit_num = 1 后如下情况:


好的 你先试试

业务租户除了meta数据 没有业务数据的 我等了一会 一直是deleting
我再次执行了alter resource tenant t1 unit_num = 2
就变成下边这种了:




报4072错误我看操作是被取消了

select * from oceanbase.dba_ob_tenants 你查一下这个信息