feat(proxy): reclaim space from the blob store
Sorting ascending by age evicts the newest blobs
Defect 1 / Tier 1 / issue
services/proxy/src/sweep.rs:102Expected review
reverse the ordering, or sort on the modification time rather than on the age derived from it.
Discovery difficulty
`sort_by_key(|candidate| candidate.age)` is what you write when you mean "sort by age". Catching it needs the reader to hold in mind that a larger age means an older blob, against a comment that has already told them the code is doing the right thing.
Trigger
a store over its ceiling holding one blob written a week ago and one written a minute ago. The minute-old one is deleted and the week-old one stays. The cache throws away what it has just fetched and keeps what nobody has wanted for a month, so the hit rate gets worse the harder the proxy is working.
Severity
issue