Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Sep 5, 2024

Conversation

aleks-p
Copy link
Contributor

@aleks-p aleks-p commented Sep 5, 2024

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.

@aleks-p aleks-p requested a review from a team as a code owner September 5, 2024 17:27
@aleks-p aleks-p changed the title fix (v2): remove invalid outdated compaction jobs from storage fix (v2): remove outdated compaction jobs from storage Sep 5, 2024
shard: j.Shard,
}
m.compactionJobQueue.evict(j.Name, math.MaxInt64)
stateUpdate.deletedJobs[key] = append(stateUpdate.deletedJobs[key], j.Name)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the actual bug fix, the rest is minor improvements (mostly logging)

@aleks-p aleks-p merged commit 4bddf2c into main Sep 5, 2024
18 checks passed
@aleks-p aleks-p deleted the fix/compaction-queue-growing branch September 5, 2024 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants