Assigns files to windows with predefined window size (in seconds) by their max timestamps.
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.