Skip to main content

ensure_region_owns_its_files

Function ensure_region_owns_its_files 

Source
pub(crate) fn ensure_region_owns_its_files(
    region_id: RegionId,
    manifest: &RegionManifest,
) -> Result<()>
Expand description

Checks that region_id holds only the files it created itself.

This is the single comparison the ownership rule is made of, factored out of RemapManifest::ensure_regions_own_their_files so a caller can run it before anything is staged: it reads one persisted manifest and returns an error naming the region and every offending file. It does not need a staging region, does not write and has no side effects.

A split is exempt at group scope: the caller that runs this early only asks the sources that take part in a merge, because a one-to-many split hands each target only that source’s files and combines no copies.