【 使用环境 】测试环境
【 OB or 其他组件 】OB
【 使用版本 】V4.3.5
【问题描述】
数据库使用过程中,有插入过一些数据。但是有一天半夜服务器断电了。启动数据库后把之前任务的目标表进行了truncate table。后续使用数据库,跑一些insert任务的过程中,有些任务会插入数据较大的任务会失败,大概1w条左右的数据插入失败,查看报错信息是(conn=3221677518)Server outof disk space。然后查看磁盘使用情况,发现磁盘占用很高。
express平台上看磁盘使用只有30多G
使用下面语句查询表数据大小,从结果发现整个oceanbase里面的表大小只有30多G,但是在Linux服务器后台/home/ocdb/myoceanbase/oceanbase/store/sstable查看block_file文件大小有585G
select
sum(T.data_size_gb)
,sum(T.required_size_gb)
from (
select
/*+ READ_CONSISTENCY(WEAK) */
t1.table_name,
round(sum(t2.data_size / 1024 / 1024 / 1024), 2) data_size_gb ,
round(sum(t2.required_size)/ 1024 / 1024 / 1024, 2) required_size_gb
from
dba_ob_tenants t,
cdb_ob_table_locations t1,
cdb_ob_tablet_replicas t2
where
t.tenant_id = t1.tenant_id
and t1.svr_ip = t2.svr_ip
and t1.tenant_id = t2.tenant_id
and t1.ls_id = t2.ls_id
and t1.tablet_id = t2.tablet_id
group by
t1.table_name
) T
;
/home/ocdb/.obd/cluster/myoceanbase/config.yaml相关配置参数为:
datafile_size: 107G system_memory: 6G log_disk_size: 107G datafile_maxsize: 644G datafile_next: 64G