Skip to content

Commit

Permalink
refactor strategy
Browse files Browse the repository at this point in the history
Signed-off-by: Little-Wallace <[email protected]>
  • Loading branch information
Little-Wallace committed May 28, 2024
1 parent 4aa3f40 commit e79e071
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,6 @@ impl CompactionTaskValidationRule for IntraCompactionTaskValidationRule {
return false;
}

if input.current_level_size > self.config.sub_level_max_compaction_bytes
&& (input.select_input_size > self.config.max_bytes_for_level_base
|| input.input_levels.len() < intra_sub_level_compact_level_count * 2)
{
return false;
}

let mut max_level_size = 0;
for select_level in &input.input_levels {
let level_select_size = select_level
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ impl IntraCompactionPicker {

for (idx, level) in l0.sub_levels.iter().enumerate() {
if level.level_type() != LevelType::Nonoverlapping
|| level.total_file_size > self.config.max_compaction_bytes
|| level.total_file_size > self.config.max_bytes_for_level_base
{
continue;
}
Expand Down Expand Up @@ -190,7 +190,6 @@ impl IntraCompactionPicker {
target_sub_level_id: level.sub_level_id,
select_input_size,
total_file_count: total_file_count as u64,
current_level_size: level.total_file_size,
..Default::default()
};

Expand Down
1 change: 0 additions & 1 deletion src/meta/src/hummock/compaction/picker/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ pub struct CompactionInput {
pub target_input_size: u64,
pub total_file_count: u64,
pub vnode_partition_count: u32,
pub current_level_size: u64,
}

impl CompactionInput {
Expand Down

0 comments on commit e79e071

Please sign in to comment.