首批通过分布式安全可靠测评,为关键业务系统打造
误回调了主机时间,OBServer 主机启动失败,报错 invalid scan_confirmed_log_cnt(ret=-4016 的原因及解决方法
更新时间:2026-06-08 02:41
问题现象
误将 OceanBase 数据库主机时钟回调到了半年前,停服后再次启动 OBServer 服务失败。
关键日志信息。
[2024-09-19 10:12:09.259326] ERROR [CLOG] notify_scan_finished_ (ob_log_scan_runnable.cpp:685) [370409][0][Y0-0000000000000000-0-0] [lt=11] [dc=0] invalid scan_confirmed_log_cnt(ret=-4016, ret="OB_ERR_UNEXPECTED", scan_confirmed_log_cnt=25, next_ilog_id=4379, last_replay_log_id=4259, pkey={tid:1099511627971, partition_id:14, part_cnt:0}) BACKTRACE:0xfce8e20 0x58284ef 0x5b10656 0x5b1026f 0x5b0fef8 0x9f607ea 0x9e4965b 0x9e44b7e 0x9e43715 0x59761d4 0xfbbdb33 0xfbbd98f 0xfe6080f
[2024-09-19 10:12:09.263429] ERROR [CLOG] do_scan_log_ (ob_log_scan_runnable.cpp:235) [370409][0][Y0-0000000000000000-0-0] [lt=4065] [dc=0] notify_scan_finished_ failed(ret=-4016) BACKTRACE:0xfce8e20 0x58284ef 0x5869014 0x58245df 0x5868e88 0x5868aa8 0x9e44cf5 0x9e438c3 0x59761d4 0xfbbdb33 0xfbbd98f 0xfe6080f
[2024-09-19 10:12:09.263476] ERROR [CLOG] do_scan_log_ (ob_log_scan_runnable.cpp:242) [370409][0][Y0-0000000000000000-0-0] [lt=44] [dc=0] log scan runnable exit error(ret=-4016) BACKTRACE:0xfce8e20 0x58284ef 0x5869014 0x58245df 0x5868e88 0x5868aa8 0x9e44ec3 0x9e437fa 0x59761d4 0xfbbdb33 0xfbbd98f 0xfe6080f
[2024-09-19 10:12:09.263531] ERROR on_fatal_error (ob_log_define.h:709) [370409][0][Y0-0000000000000000-0-0] [lt=22] [dc=0] ret = -4016 BACKTRACE:0xfce8e20 0x9a814c2 0x9e43818 0x59761d4 0xfbbdb33 0xfbbd98f 0xfe6080f BACKTRACE:0xfce8e20 0x58284ef 0xfcd184d 0x9a81505 0x9e43818 0x59761d4 0xfbbdb33 0xfbbd98f 0xfe6080f
问题原因
系统主机时间回调后,出现时钟回退,clog 和 ilog 记录异常,导致 OBServer 服务失败。
问题的风险及影响
OBServer 服务启动失败。
影响租户
影响 OceanBase 数据库中的 SYS 租户和 Oracle 租户以及 MySQL 租户。
适用版本
OceanBase 数据库 V3.x、V4.x 版本。
解决方法及规避方式
解决方法:
重建集群,或者允许数据丢失情况下,删除异常时间段的 ilog 日志后再重启 OBServer 服务。
规避方式:
禁止回调主机时间。