async fn read_releases(
io: &dyn WalObjectIo,
catalog: &ObjectCatalog,
fetched: HashMap<u64, Bytes>,
) -> Result<HashMap<RegionId, EntryId>>Expand description
Reads the release records of the indexed objects, which seed the
watermarks of their regions, from the segment of RELEASE_REGION_ID of
every indexed object that holds one: the bytes in fetched by object
sequence, which the reads of the footers returned, or else one range read.
The segments of objects that are not indexed are never decoded. A segment
that cannot be fetched or does not decode fails recovery, whatever
on_corrupted_segment says: skipping it would lose the watermarks it
seeds.
A release record needs no bookkeeping of its own. It is sealed once every entry it covers was admitted, so it lies in the object holding the last segment it covers or in a later one. Collection deletes, in any order, only objects below the durable reclaim boundary, and recovery indexes only objects at or above the boundary of the tip, which a start object carries forward. So recovery indexes a release record whenever it indexes a segment the record covers, and once the record is below the boundary so is every segment it covers, which recovery never indexes again, whether collection deleted it yet or not. A release in full also covers entries a region would be assigned afterwards, so it is made only for a region that writes nothing more.