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

Allow compactor disablement #1850

Merged
merged 4 commits into from
Nov 3, 2022
Merged

Conversation

zalegrala
Copy link
Contributor

@zalegrala zalegrala commented Oct 31, 2022

Without this change, there isn't a good way to disable compaction when running in single binary or scalable single binary mode. Normally, when running in microservices mode, operators can simply scale down the compactors to 0 to effectively disable compaction, though this will have other consequences, since the compactors are doing a little more than compaction.

Here we include a config option to disable compaction at the compactor level. This allows the compactor module to run, but disable compaction, allowing blocks to remain in the backend for debug or investigation purposes.

Checklist

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

@zalegrala zalegrala marked this pull request as ready for review October 31, 2022 21:52
Copy link
Member

@mapno mapno left a comment

Choose a reason for hiding this comment

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

This should be in the docs, with an explanation on when to use it. It's a very niche use case that will confuse more users than it'll be used by.

Without this change, there isn't a good way to disable compaction when
running in single binary or scalable single binary mode.  Normally, when
running in microservices mode, operators can simply scale down the
compactors to 0 to effectively disable compaction, though this will have
other consequences, since the compactors are doing a little more than
compaction.

Here we include a config option to disable compaction at the compactor
level.  This allows the compactor module to run, but disable compaction,
allowing blocks to remain in the backend for debug or investigation
purposes.
Signed-off-by: Zach Leslie <[email protected]>
Signed-off-by: Zach Leslie <[email protected]>
modules/compactor/config.go Outdated Show resolved Hide resolved
Signed-off-by: Zach Leslie <[email protected]>
@zalegrala zalegrala enabled auto-merge (squash) November 3, 2022 16:00
@zalegrala zalegrala merged commit a91d441 into grafana:main Nov 3, 2022
@zalegrala zalegrala deleted the compactorDisable branch November 3, 2022 16:17
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