Code intel: Improve eviction strategy
Created by: efritz
Currently our eviction strategy is simple: Remove any commit that is
- older than
PRECISE_CODE_INTEL_DATA_TTL
(720h/~30d by default), and - is not visible from the tip of the default branch
This isn't enough, as we need to now consider:
- indexes that exist as dependencies of another active index
- indexes that describe a named branch or tag, but is not itself tip (releases)
We need to start tracking additional information to more accurately determine what we can throw out.