Skip to main content

pick_dense_closed_merge

Function pick_dense_closed_merge 

Source
fn pick_dense_closed_merge(
    units: &[Unit],
    files: &[FileHandle],
    extents: &[Extent],
    index: &ExtentIndex<'_>,
    options: ClosedMergeOptions,
) -> Option<UnitPick>
Expand description

Picks a bounded file reduction when the split-unit conflict graph is too dense to materialize.

The candidate comes from pick_reducing_interval_where, which ignores conflicts. If rejected, it is searched once more for a one-output interval. Both candidates must pass adds_no_conflicts, so the (P, N) termination argument still holds. Searching only within the original candidate adds at most O(K²) interval visits for K input files and one extra conflict check, rather than checking external conflicts for every interval in the window. This bounded retry can still miss other safely reducible intervals.