From 52da04d4c92d144ef70605591e27eae0cb102e41 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 2 Apr 2024 01:54:20 +0000 Subject: [PATCH] fix: show sub_level_id for level 0 in rw_hummock_sstables (#15797) (#15799) Co-authored-by: Zhanxiang (Patrick) Huang Co-authored-by: Huangjw <1223644280@qq.com> --- .../src/catalog/system_catalog/rw_catalog/rw_hummock_version.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontend/src/catalog/system_catalog/rw_catalog/rw_hummock_version.rs b/src/frontend/src/catalog/system_catalog/rw_catalog/rw_hummock_version.rs index 48e2dcfd5361b..8332cc4d1d453 100644 --- a/src/frontend/src/catalog/system_catalog/rw_catalog/rw_hummock_version.rs +++ b/src/frontend/src/catalog/system_catalog/rw_catalog/rw_hummock_version.rs @@ -123,7 +123,7 @@ fn version_to_sstable_rows(version: HummockVersion) -> Vec { object_id: sst.object_id as _, compaction_group_id: cg.group_id as _, level_id: level.level_idx as _, - sub_level_id: (level.level_idx > 0).then_some(level.sub_level_id as _), + sub_level_id: (level.level_idx == 0).then_some(level.sub_level_id as _), level_type: level.level_type as _, key_range_left: key_range.left, key_range_right: key_range.right,