mito2::compaction

Module twcs

Source

Structs§

  • TwcsPicker picks files of which the max timestamp are in the same time window as compaction candidates.
  • Window πŸ”’

Constants§

Functions§

  • Assigns files to windows with predefined window size (in seconds) by their max timestamps.
  • enforce_file_num πŸ”’
    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.
  • Limits the size of compaction output in a naive manner. todo(hl): we can find the output file size more precisely by checking the time range of each row group and adding the sizes of those non-overlapping row groups. But now we’d better not to expose the SST details in this level.
  • Finds the latest active writing window among all files. Returns None when there are no files or all files are corrupted.