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

feat: Improve compaction shutdown #2903

Merged
merged 3 commits into from
Jan 10, 2024

Conversation

cyriltovena
Copy link
Contributor

I've seen traces where it took 10m to compact. When we rollout a new version it can get cancelled in the upload and deletion which is usually less than 2m.

I think we should leave a grace period for uploads and marking blocks deleted.

@cyriltovena cyriltovena requested a review from a team as a code owner January 9, 2024 15:18
Copy link
Contributor

@simonswine simonswine left a comment

Choose a reason for hiding this comment

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

LGTM, I think you also should raise the terminationGracePeriodSeconds from the default of 30 seconds, for the compactor:

@@ -539,8 +539,14 @@ func (c *BucketCompactor) runCompactionJob(ctx context.Context, job *Job) (shoul
if err = verifyCompactedBlocksTimeRanges(compIDs, toCompactMinTime.UnixMilli(), toCompactMaxTime.UnixMilli(), subDir); err != nil {
level.Warn(jobLogger).Log("msg", "compacted blocks verification failed", "err", err)
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Should probably be an error:

Suggested change
level.Warn(jobLogger).Log("msg", "compacted blocks verification failed", "err", err)
level.Error(jobLogger).Log("msg", "compacted blocks verification failed", "err", err)

@cyriltovena cyriltovena enabled auto-merge (squash) January 10, 2024 07:57
@cyriltovena cyriltovena merged commit 749ad99 into main Jan 10, 2024
19 checks passed
@cyriltovena cyriltovena deleted the pyroscope/compactor-improv-shutdown branch January 10, 2024 14:26
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