diff --git a/src/meta/src/hummock/compaction/picker/min_overlap_compaction_picker.rs b/src/meta/src/hummock/compaction/picker/min_overlap_compaction_picker.rs index f082c405a61ff..a0d896daa439c 100644 --- a/src/meta/src/hummock/compaction/picker/min_overlap_compaction_picker.rs +++ b/src/meta/src/hummock/compaction/picker/min_overlap_compaction_picker.rs @@ -356,6 +356,10 @@ impl NonOverlapSubLevelPicker { ret.sstable_infos[0].extend(vec![sst.clone()]); } + if self.enable_check_task_level_overlap { + self.verify_task_level_overlap(&ret, levels); + } + ret.sstable_infos.retain(|ssts| !ssts.is_empty()); // To check whether the task is expected @@ -386,10 +390,6 @@ impl NonOverlapSubLevelPicker { } } - if self.enable_check_task_level_overlap { - self.verify_task_level_overlap(&ret, levels); - } - ret }