mito2::compaction::twcs

Function enforce_file_num

Source
fn enforce_file_num<T: Item>(files: &[T], max_file_num: usize) -> Vec<T>
Expand description

Merges consecutive files so that file num does not exceed max_file_num, and chooses the solution with minimum overhead according to files sizes to be merged. enforce_file_num only merges consecutive files so that it won’t create overlapping outputs. runs must be sorted according to time ranges.