First we send parts, client needs to generate :refresh_state_uuid, :refresh_state_part_uuid. Where :refresh_state_uuid must be same for all the parts and :refresh_state_part_uuid. We do expect uuid format.
After all parts were sent we send :total_parts, which is integer marking how many parts we expect with refresh_state_uuid to identify to which full refresh this belongs to. And optionally :sweep_scope that allows us to do full refresh of just 1 or more inventory collection.
The sweeping waits until all parts were saved, then it deletes/archives all records that were not touched (we use :last_seen_on column for this)
Allowing mark&sweep for archival and deletion
First we send parts, client needs to generate :refresh_state_uuid, :refresh_state_part_uuid. Where :refresh_state_uuid must be same for all the parts and :refresh_state_part_uuid. We do expect uuid format.
After all parts were sent we send :total_parts, which is integer marking how many parts we expect with refresh_state_uuid to identify to which full refresh this belongs to. And optionally :sweep_scope that allows us to do full refresh of just 1 or more inventory collection.
The sweeping waits until all parts were saved, then it deletes/archives all records that were not touched (we use :last_seen_on column for this)