首批通过分布式安全可靠测评,为关键业务系统打造
因 IO 问题导致 SQL 执行报错 -4012 的原因及解决方法
更新时间:2026-06-16 09:21
问题现象
SQL 执行报错 -4012,但实际并不到超时时间。
关键日志信息。
[2022-12-13 09:52:00.177915] WARN [STORAGE] wait (ob_storage_file.cpp:314) [142471][0][xxxxx-xxxxx-xxxxx-xxxxx] [lt=10] [dc=0] fail to wait block io, may be retry(macro_id_=[0-2284681](ver=1,mode=0,seq=2284676), ret=-4012, timeout_ms=7199990)
[2022-12-13 09:52:00.177927] WARN [STORAGE] wait (ob_storage_file.cpp:316) [142471][0][xxxxx-xxxxx-xxxxx-xxxxx] [lt=9] [dc=0] fail to handle aio error(ret=-4012, macro_id_=[0-2284681](ver=1,mode=0,seq=2284676), timeout_ms=7199990)
[2022-12-13 09:52:00.177934] WARN [STORAGE] get_block_data (ob_micro_block_handle_mgr.cpp:76) [142471][0][xxxxx-xxxxx-xxxxx-xxxxx] [lt=6] [dc=0] Fail to wait micro block io, (ret=-4012)
问题原因
因 IO 超时导致 SQL 报错 -4012。
问题的风险及影响
SQL 执行报错 -4012。
影响租户
影响 OceanBase 数据库中的 SYS 租户和 Oracle 租户以及 MySQL 租户。
适用版本
OceanBase 数据库 V3.x 版本。
解决方法
处理磁盘 IO 问题。