grafana / pyroscope

Continuous Profiling Platform. Debug performance issues down to a single line of code
https://grafana.com/oss/pyroscope/
GNU Affero General Public License v3.0
10.13k stars 614 forks source link

fix (v2): remove outdated compaction jobs from storage #3543

Closed aleks-p closed 2 months ago

aleks-p commented 2 months ago

When we encounter a job that has no valid blocks (e.g., because they were deleted by the truncation logic) we currently remove it from the in-memory store but not from bolt DB. This causes a burst of new (invalid) jobs every time we restore from a snapshot.

This change ensures that such jobs are removed. There are a few other (mostly cosmetic) changes as well.