-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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: could "blocks marked for deletions" be deleted at the beginning? #2605
Comments
I guess we could, but still how that be helpful for you? It's a matter of few iterations really. Should not matter over longer period of time (: |
You are right, usually it should not be much difference. |
Started thinking about this too, this could be painful where you might run into quota problems if Thanos Compactor wouldn't finish its iteration quickly enough. Maybe it would be nice to have some kind of subcommand under |
We're currently running into a similar problem. We have compactor which is continuously looping within the Have you considered decoupling the blocks deletion from the compactor main loop and running the blocks deletion in background with its own periodic ticker? It would require to do another full bucket scan to find blocks marked for deletion (using a dedicated metadata fetcher) but it wouldn't be blocked by the compactor. |
As a workaround, would running another instance of Compactor as a cron job with If I'm reading it right, this instance of Compactor will not try to compact any blocks, so it can safely run alongside exsting Compactors and instead of compacting, skip to removing blocks marked for deletion. |
Based on @zygiss idea above to disable compaction, but it being 1am and me feeling fuzzy in the brain, I wasn't certain about modifying the appropriate hidden compaction level, so I compiled myself a special thanos binary with the following modifications:
It ran pretty well, proceeding immediately to deletion. For safety, I shut off the normal compactor (to avoid any risk of race conditions - even though there may not be any in the the deletion function). Logs:
It ran fine, exit, and now I'm back to my normal compactor. |
Hello 👋 Looks like there was no activity on this issue for last 30 days. |
Would it be possible to add the |
Hello 👋 Looks like there was no activity on this issue for the last two months. |
Maybe let's open a separate issue for this? As for the OP, it has been implemented in #3115 and will be in the next version. Closing as fixed. |
Thanos, Prometheus and Golang version used:
#thanos --version
thanos, version 0.12.2 (branch: HEAD, revision: 52e10c6)
build user: root@c1a6cf60f03d
build date: 20200430-16:24:03
go version: go1.13.6
Object Storage Provider:
S3 compatible
What happened:
I have problem with the s3 storage quota with the new feature #2136 from v0.12.0.
Generally this is a great feature.
But the blocks marked for deletion are only deleted at the end after the retention actions.
This needs more external storage than necessary as the steps before create new files.
What you expected to happen:
Could the deleting of the blocks are ready to be deleted be delete at the beginning of a compaction iteration?
This should not interfere with the other compact action, as these block are not any more used by compaction.
How to reproduce it (as minimally and precisely as possible):
With every compact execution.
Full logs to relevant components:
You can see the order of the action in log file:
The text was updated successfully, but these errors were encountered: