From 40e8f25c4dee7fbbf2e45a6ced6ed3a2b2b1c1b3 Mon Sep 17 00:00:00 2001 From: Li0k Date: Mon, 4 Nov 2024 15:23:23 +0800 Subject: [PATCH] typo --- .../src/hummock/local_version/pinned_version.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/storage/src/hummock/local_version/pinned_version.rs b/src/storage/src/hummock/local_version/pinned_version.rs index b8aeace6c8393..bccede6b4add5 100644 --- a/src/storage/src/hummock/local_version/pinned_version.rs +++ b/src/storage/src/hummock/local_version/pinned_version.rs @@ -131,7 +131,16 @@ impl PinnedVersion { } fn levels_by_compaction_groups_id(&self, compaction_group_id: CompactionGroupId) -> &Levels { - self.version.levels.get(&compaction_group_id).unwrap() + self.version + .levels + .get(&compaction_group_id) + .unwrap_or_else(|| { + panic!( + "levels for compaction group {} not found in version {}", + compaction_group_id, + self.id() + ) + }) } pub fn levels(&self, table_id: TableId) -> impl Iterator {