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

Compact TSDB on open. #2870

Merged
merged 7 commits into from Jul 14, 2020
Merged

Compact TSDB on open. #2870

merged 7 commits into from Jul 14, 2020

Conversation

pstibrany
Copy link
Contributor

@pstibrany pstibrany commented Jul 13, 2020

What this PR does: This PR calls Compact method on newly openened TSDB. If there is data in head that needs to be cut into blocks, this will force it. If there is no such data, this is a noop.

Which issue(s) this PR fixes:
Fixes #2869

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

If there is data in head that needs to be cut into blocks,
this will force it. If there is no data, this is noop.

Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
Copy link
Contributor

@pracucci pracucci left a comment

Choose a reason for hiding this comment

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

Good job and thanks! LGTM (modulo few nits)

pkg/ingester/ingester_v2.go Outdated Show resolved Hide resolved
pkg/ingester/ingester_v2.go Outdated Show resolved Hide resolved
pkg/ingester/ingester_v2_test.go Outdated Show resolved Hide resolved
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
@pstibrany
Copy link
Contributor Author

Thanks for review, I've addressed your comments now.

@pracucci
Copy link
Contributor

Thanks @pstibrany! Let's merge it 😉

@pracucci pracucci merged commit a8fd33b into cortexproject:master Jul 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ensure ingester's TSDB Compact() is called after WAL replay
2 participants