基于湖库一体架构,统一管理结构化、半结构化与非结构化等多模态数据,一个系统承载事务处理、实时分析与 AI 工作负载。
OceanBase 数据库中执行 insert into select from 多表 join SQL 报错 -4016,Internal error 的原因和解决方法
更新时间:2026-05-14 07:41
问题现象
OceanBase 数据库中执行 insert into select from 多表 join SQL 执行报错 -4016, Internal error。

关键日志信息。
[2024-11-28 04:47:42.928008] WDIAG [SQL.EXE] find_taskset_by_tsc_id (ob_granule_pump.cpp:1500) [2870483][T1006_L0_G0][T1006][xxxxx-xxxxx-xxxxx-xxxxx] [lt=23][errcode=-4016] task don't exist(ret=-4016, op_id=10)
[2024-11-28 04:47:42.928045] WDIAG [SQL.EXE] fetch_pw_granule_from_shared_pool (ob_granule_pump.cpp:488) [2870483][T1006_L0_G0][T1006][xxxxx-xxxxx-xxxxx-xxxxx] [lt=36][errcode=-4016] the op_id do not have task set(ret=-4016, op_id=10)
[2024-11-28 04:47:42.928057] WDIAG [SQL.EXE] try_fetch_pwj_tasks (ob_granule_pump.cpp:288) [2870483][T1006_L0_G0][T1006][xxxxx-xxxxx-xxxxx-xxxxx] [lt=10][errcode=-4016] fetch granule from shared pool failed(ret=-4016)
问题原因
在 insert into select from 多表 join 场景,当 insert 的表和 join 的表都是单分区并且 Leader 在不同节点,生产一个分布式计划时,因产品缺陷导致 PX PARTITION ITERATOR 计划上少打了内部标记,进行 SQL 执行时报错。
问题的风险及影响
SQL 执行报错。
影响租户
影响 OceanBase 数据库中的 SYS 租户和 Oracle 租户以及 MySQL 租户。
适用版本
OceanBase 数据库 V4.x 版本。
解决方法及规避方式
添加 /*+ parallel(2) */ hint 来规避。