Skip to content

Commit

Permalink
fix(storage): fix pre_process_task
Browse files Browse the repository at this point in the history
  • Loading branch information
Li0k committed Dec 22, 2022
1 parent 8815279 commit 5a73c46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/storage/src/hummock/compactor/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ impl Compactor {

pub fn pre_process_task(task: &mut Task, workload: &CompactorWorkload) {
const CPU_THRESHOLD: u32 = 80;
if let Task::CompactTask(mut compact_task) = task.clone() {
if let Task::CompactTask(compact_task) = task {
if workload.cpu > CPU_THRESHOLD && compact_task.input_ssts[0].level_idx != 0 {
compact_task.set_task_status(TaskStatus::ManualCanceled);
}
Expand Down

0 comments on commit 5a73c46

Please sign in to comment.