-
Notifications
You must be signed in to change notification settings - Fork 476
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
Compact userTSDB's OOO head when compacting head #4180
Conversation
This fixes a bug where the OOO head was not being compacted for an idle TSDB or when the compaction was forced.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks fine to me. Let's fix the test and get this merged.
This PR also needs a CHANGELOG entry.
@pstibrany thanks for the feedback, test looks cleaner now. I've added a changelog entry, but you may be able to phrase it better since you have more context on the issue this was causing. Feel free to push any changes and merge if you think it's ready (I'll be on PTO for the rest of the week and I don't want to block this) |
Signed-off-by: Peter Štibraný <pstibrany@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much. I've rephrased changelog entry a bit, but we cannot merge until you sign the Contributor License Agreement: https://cla-assistant.io/grafana/mimir?pullRequest=4180.
I've enabled automerge, once you sign the CLA.
Nice work!! 💪 I believe this PR has also helped with #4160 |
What this PR does
This adds a call to
db.CompactOOOHead
as part ofuserDb.compactHead
, which means the OOO head is also compacted apart from the in-order head. As a consequence, compactions caused by idling DBs or forced head compactions will now also compact the OOO head, see code below:mimir/pkg/ingester/ingester.go
Lines 2196 to 2203 in 6852e94
Which issue(s) this PR fixes or relates to
Fixes #4160
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]