首批通过分布式安全可靠测评,为关键业务系统打造
transfer partition 后手动取消,日志流迁移目的端持续报错 -4551,磁盘空间不足的原因和解决方法
更新时间:2026-06-12 08:51
问题现象
在对 OceanBase 数据库进行 transfer partition 操作,并手动取消任务后,分裂出的临时日志流迁移至目的端时因磁盘空间不足报错 -4551,且不断重试。
关键信息
关键日志:
日志流迁移目的端持续出现。
failed to check_is_disk_full, cannot migrate in(ret=-4551
SQL 预期结果:
确认迁移失败的日志流 ls_id。
select * from CDB_OB_BALANCE_TASK_HISTORY where tenant_id = xxx;确认迁移失败日志流所属的 unit group。
select * from CDB_OB_LS where tenant_id = xxx and ls_id = xxx;确认迁移失败日志流源端 unit 和目的端 unit 所属的 unit group。
select * from DBA_OB_UNITS where tenant_id = xxx;
若 transfer partition 后手动取消,迁移目的端持续出现关键日志,且迁移失败日志流 unit group 与目的端 unit 所属的 unit group 相同,则命中此问题。
问题原因
手动取消 transfer partition 任务后,负载均衡模块任务清除,但分裂的临时日志流 unit_group_id 被修改为目的端 unit_group_id,因此容灾模块会进行 unit_group_id 对齐,调度临时日志流迁移至目的端。由于一次 transfer 大量 partition,临时日志流上 tablet 数量过多,目的端磁盘空间不足。容灾模块持续重试调度日志流迁移,导致目的端持续报错 -4551。
问题的风险及影响
日志流迁移持续失败,负载不均衡。
适用版本
OceanBase 数据库 V4.x 版本。
解决方法
方式一:使用日志流副本运维命令。
OceanBase 数据库 V4.2.1 系列:V4.2.1 BP11(oceanbase-4.2.1.11-111000052025032520)及之后版本。
OceanBase 数据库 V4.2.5 系列:V4.2.5 BP1(oceanbase-4.2.5.1-101000182024120722)及之后版本。
以上版本支持日志流副本运维命令。通过日志流副本运维命令,将迁移失败日志流的 unit_group 修改为迁移源端 unit 所属的 unit_group。
alter system modify ls xxx unit_group xxx tenant = 'xxx';
方式二:手动 transfer partition。
若当前版本不支持日志流副本运维命令,可以手动 transfer 一部分迁移失败日志流的 partition 到源端的其他日志流上。
关闭
enable_rebalance。alter system set enable_rebalance = false tenant = 'xxx';查找迁移失败日志流上有哪些分区,找到分区对应的 table_id 和 object_id。
select * from CDB_OB_TABLE_LOCATIONS where tenant_id = xxx and ls_id = xxx;transfer 迁移失败日志流上的 partition 到迁移源端日志流。
alter system transfer partition table_id xxx, object_id xxx to ls xxx tenant = 'xxx';transfer 完成后,重新打开
enable_rebalance。alter system set enable_rebalance = true;
如有其他疑问,请联系 OceanBase 数据库技术支持团队。
规避方式
transfer partition 前,需要关注目的端磁盘空间是否足够,尽量避免一次 transfer 大量 partition。