Skip to main content

sources_sharing_a_target

Function sources_sharing_a_target 

Source
pub fn sources_sharing_a_target(
    mapping: &HashMap<RegionId, Vec<RegionId>>,
) -> Vec<RegionId>
Expand description

The source regions that publish their files into a target region another source publishes into too.

This is the shape in which a repartition can publish one object twice: two distinct sources hand their file sets to the same target, so a shared object and a materialized copy of it can both become visible there. It is also the exact shape that the two ownership checks guard - the pre-publication check of the repartition procedure, which asks Self which sources to validate, and the remap-time guard (mito2::remap_manifest::RemapManifest::is_split), which exempts the other shapes.

The predicate is deliberately stated per target, not per source count: whether one source feeds one target or several says nothing about combining file sets. A one-to-many mapping hands each child its own part of every object, and a one-to-one mapping hands the object to the only target, so neither combines two sources’ copies. Only a target fed by two or more distinct sources does.

Returned in ascending region id order, so a message that names them is stable.