pub fn retention_buckets(
backups: &[&Snapshot],
policy_is_multi: bool,
) -> BTreeMap<String, Vec<SnapshotRetentionView>>Expand description
Pure. The GFS population of backups, bucketed exactly as a prune would
bucket it.
This is the one place the shape of a retention run is decided:
retention_view filters the population and retention_group_key splits
it. backups_to_delete runs select_kept over these buckets and returns the
losers; the web UI runs the same select_kept over the same buckets and asks
whether one id is a winner. Sharing this means a preview cannot answer about
a set the operator will never evaluate.
Terminating rows are excluded (#382 C1): with the population served from a reflector store, an externally-deleted-but-still-cached NEWER snapshot must not claim a keep slot and push a LIVE row into the delete set.