【OceanBase诊断调优】—— 如何查看 Root Service 切换完成的时间点

本文详述如何查看 Root Service 切换完成的时间点。

在主 Root Service 节点上的 rootservice.log 搜索。

grep -i "START_SERVICE: full_service !!! start to work!!" rootservice.log

[2023-12-08 14:35:58.927245] INFO  [RS] ob_root_service.cpp:7111 [27152][0][YB42AC1C0EFA-00060BE72B4C9723-0-0] [lt=3] [dc=0] [NOTICE] START_SERVICE: full_service !!! start to work!!

也可以通过 __all_rootservice_event_history 和 __all_server_event_history 查看相关历史记录。

select * from __all_rootservice_event_history where module='root_service' and event in ('start_rootservice','stop_rootservice') order by gmt_create desc;
select * from __all_server_event_history where module='election' and event='switch_leader' and value2 like '%tid:1099511627777%' order by gmt_create desc limit 20;

tid:1099511627777 为 1 号表(__all_core_table)的 table_id

适用版本

OceanBase 数据库所有版本。

上一篇:缓存神器-JetCache


下一篇:通过iptables限制docker 容器的运行端口