首批通过分布式安全可靠测评,为关键业务系统打造
历史合并信息 tablet_id 查询
更新时间:2025-10-17 09:41
问题现象
在 OceanBase 数据库中查询 oceanbase.GV$OB_TABLET_COMPACTION_HISTORY 中有关 compaction 的历史记录时,发现 tablet_id = 49402 的表的合并信息。
当使用 sys 租户查询该表的信息时,没有查到对应的表。
使用的查询语句如下:
select * from oceanbase.cdb_ob_table_locations l where l.svr_ip = 'xxx.xxx.xxx.184' and l.tenant_id = '1002' and l.tablet_id = '49402'\G;
适用版本
OceanBase 数据库 V4.x 版本。
解决方法
可以通过查询 __all_virtual_table_mgr,语句如下:
select * from __all_virtual_table_mgr where tenant_id = 1002 and ls_id <> 1 and tablet_id =49402;
有关 tablet_id = 49402 对应的 table_type 含义可参见:系统表 __all_virtual_table_mgr 中 table_type 的含义