From 1d04366e3eb1d19c700c129a61d01b235d3ea515 Mon Sep 17 00:00:00 2001 From: Li0k Date: Sun, 8 Oct 2023 17:16:57 +0800 Subject: [PATCH] fix(storage): auto_pick_type should cover Tombstone type (#12670) --- src/meta/src/hummock/manager/mod.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/meta/src/hummock/manager/mod.rs b/src/meta/src/hummock/manager/mod.rs index e8f8a3b1315ca..bded17217d360 100644 --- a/src/meta/src/hummock/manager/mod.rs +++ b/src/meta/src/hummock/manager/mod.rs @@ -3016,9 +3016,13 @@ impl CompactionState { Some(compact_task::TaskType::SpaceReclaim) } else if guard.contains(&(group, compact_task::TaskType::Ttl)) { Some(compact_task::TaskType::Ttl) + } else if guard.contains(&(group, compact_task::TaskType::Tombstone)) { + Some(compact_task::TaskType::Tombstone) } else if guard.contains(&(group, compact_task::TaskType::Dynamic)) { Some(compact_task::TaskType::Dynamic) } else { + // Other types are not triggered by `try_sched_compaction`, so no need to be handled. + // TODO: Consider using match state to avoid missing newly added types None } }