首批通过分布式安全可靠测评,为关键业务系统打造
如何观察 OBServer 重启后 clog 回放进度
更新时间:2026-06-12 04:01
OBServer 重启后,其状态会从 inactive 变为 active 后,还需要一段时间才会对外提供服务,即 start service time != 0,这段时间 OBServer 在进行回放 clog,刷新 location cache 等动作。如需在这个过程中观察 clog 回放的进度,可以通过 scan process bar 关键字搜索 observer.log 文件。
适用版本
OceanBase 数据库 V3.x、V4.x 版本。
操作步骤
oceanbase 数据库 V3.x 版本
可通过下述命令检查
observer.log文件(此类信息每秒更新一次,可按需查询)。grep 'scan process bar' observer.log|tail -100日志样例如下。
[2022-05-10 22:49:42.999743] INFO [CLOG] ob_log_scan_runnable.cpp:699 [26219][1144][Y0-0000000000000000] [lt=24] [dc=0] scan process bar(curr_file_id=633923, start_file_id=630066, last_file_id=635865, total_file_cnt=5800, processed_file_cnt=3858, rest_file_cnt=1942, estimated_rest_time(second)=356)其中:
start_file_id为正在回放的 clogid。rest_file_cnt为剩余的需要回放的 clog 的个数。estimated_rest_time即为预计完成的时间。
oceanbase 数据库 V4.x 版本
可通过下述命令检查
observer.log文件(此类信息每秒更新一次,可按需查询)。grep 'dump tenant replay process' observer.log|tail -100说明
dump tenant replay process为租户级,打印的是每个租户的 clog 回放情况。日志样例如下。
[2025-08-07 11:34:36.344188] INFO [CLOG] runTimerTask (ob_log_replay_service.cpp:174) [82721][T1003_TimerWK1_ReplayProcessSt][T1003][Y0-0000000000000000-0-0] [lt=12] dump tenant replay process(tenant_id=1003, unsubmitted_log_size(MB)=0, unreplayed_log_size(MB)=0, estimate_time(second)=0, submitted_log_size(MB)=15, replayed_log_size(MB)=15, last_submitted_log_size(MB)=15, last_replayed_log_size(MB)=15, round_cost_time(second)=10, pending_replay_log_size(MB)=0)其中:
unreplayed_log_size为未回放日志量。estimate_time为预估的剩余回放时间。replayed_log_size为启动后已经回放的日志量。