Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
wenym1 committed Oct 18, 2024
1 parent c01749b commit 2826323
Showing 1 changed file with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ impl HummockVersion {

// apply to `levels`, which is different compaction groups
for (compaction_group_id, group_deltas) in &version_delta.group_deltas {
let mut is_l0_changed = false;
let mut is_applied_l0_compact = false;
for group_delta in &group_deltas.group_deltas {
match group_delta {
GroupDeltaCommon::GroupConstruct(group_construct) => {
Expand Down Expand Up @@ -621,7 +621,6 @@ impl HummockVersion {
inserted_table_infos.clone(),
None,
);
is_l0_changed = true;
}
}
} else {
Expand All @@ -632,7 +631,7 @@ impl HummockVersion {
.compaction_group_member_table_ids(*compaction_group_id),
);
if level_delta.level_idx == 0 {
is_l0_changed = true;
is_applied_l0_compact = true;
}
}
}
Expand All @@ -658,16 +657,16 @@ impl HummockVersion {
inserted_table_infos.clone(),
None,
);
is_l0_changed = true;
}
}
GroupDeltaCommon::GroupDestroy(_) => {
self.levels.remove(compaction_group_id);
}
}
}
if is_l0_changed && let Some(levels) = self.levels.get_mut(compaction_group_id) {
levels.update_l0();
if is_applied_l0_compact && let Some(levels) = self.levels.get_mut(compaction_group_id)
{
levels.post_apply_l0_compact();
}
}
self.id = version_delta.id;
Expand Down Expand Up @@ -1063,7 +1062,7 @@ impl Levels {
}
}

pub(crate) fn update_l0(&mut self) {
pub(crate) fn post_apply_l0_compact(&mut self) {
{
self.l0
.sub_levels
Expand Down

0 comments on commit 2826323

Please sign in to comment.