pub fn convert_allocation_plan_to_repartition_plan(
table_id: TableId,
next_region_number: &mut RegionNumber,
_: &AllocationPlanEntry,
) -> RepartitionPlanEntryExpand description
Converts an allocation plan to a repartition plan.
Converts an AllocationPlanEntry (which contains abstract region allocation intents)
into a RepartitionPlanEntry with concrete source and target region descriptors,
plus records information on which regions are newly allocated and/or pending deallocation.
§Returns
A Result containing the RepartitionPlanEntry describing exactly the source regions,
the target regions (including any that need to be newly allocated), and transition mappings.
§Notes
- If new regions are needed, their region ids are constructed using
table_idand incrementing fromnext_region_number. - For each target, associates the correct region descriptor; for new regions, the region id is assigned sequentially.