do not excldue last tier

Signed-off-by: Alex Chi Z <chi@neon.tech>
This commit is contained in:
Alex Chi Z
2023-07-03 14:02:53 -04:00
parent 8816fc98fc
commit 756319b0ce

View File

@@ -3984,15 +3984,10 @@ impl Timeline {
// Trigger 3: reduce number of sorted runs, pick up to max_merge_width files to compact.
let mut compact_tiers: Vec<usize> = Vec::new();
let last_tier = tier_sizes.last().unwrap().0;
for (tier_id, size) in tier_sizes {
if skip_tiers.contains(&tier_id) {
break;
}
if tier_id == last_tier {
// exclude bottom-most level
break;
}
total_size_up_to_lvl += size;
compact_tiers.push(tier_id);
}