-
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
sidecar: Handle or do not allow delete_series
for Thanos with object store backup
#415
Comments
Great we found the root cause :) Even better would be (in a dream scenario), that you can do delete_series in Thanos. And that Thanos deletes series in the bucket also. But it might be a good start to let the compactor just delete the new/adjusted blocks on each run. |
What do you mean? I think it is way more clear to block this behaviour and be explicit about it. (not sure yet how). Basically if we do this ("let the compactor just delete the new/adjusted blocks on each run.") we have few problems:
All of this makes me think to do either: Can we first enumerate what are the use cases for Any ideas? |
The reason I deleted a serie was that the client was initially configured incorrectly, and sent metrics with wrong tags to Prometheus. After reconfiguration it was fine, but somehow I need to get rid of the broken samples in the TSDB. |
I guess, it's a rare case. TSDB buckets are supposed to be immutable, so deleting the series from the storage means literally recalculate whole data, which could be unwarrantedly expensive. Bear in mind this is seldom case, to solve the |
@xjewer: its rare indeed. And doesn't happen by default. |
I have an issue where the delete series from S3/GCS is really needed. as someone created some funky metrics which breaks the compactor process. The only reasonable way I can continue using Thanos now is by deleting these metrics from S3. I cannot afford to delete all the blocks |
Small update: the "out-of-order label set" error in the compactor was caused by the |
Cool, have you put an issue on Prometheus github? Let's figure out how to unblock you. I think that all of those issues, like Not sure, if delete series helps here as you would have something produced broken series continously (: so you would endup deleting this series every 3h (: |
This is generally true, but there is another dimension to consider: memory. We have been experiencing recently problems with the |
Ok, so:
We have a couple of options:
|
I have the same scenario, I found metrics with high cardinality and need to remove them because of.
AFAIK the only solution would be either scaling up thanos resources or to delete data from S3? |
Related to #903 |
is it possible to just delete entire tsdb blocks? for me the first blocks had a lot of metrics with high cardinality, and, if deleting those metrics is not possible, I would be happy to be able to delete entire blocks instead. |
@caarlos0 you can do that just fine - but better turn off compactor temporarily for that. The concern is that compactor might be compacting that very block to bigger block and thus deletion would not help. |
This issue/PR is has been automatically marked as stale because it has not had recent activity. Please comment on status otherwise the issue will be closed in a week. Thank you for your contributions. |
Signed-off-by: Pedro Tanaka <pedro.tanaka@shopify.com>
Basically https://github.com/prometheus/prometheus/blob/master/docs/querying/api.md#delete-series is unsafe to run with Thanos sidecar that uploads blocks to bucket because:
It is worth to note that it does not make sense much to do
delete_series
on local Prometheus with Thanos backup, because most likely all blocks are already uploaded at the moment when Prometheus replaces these with rewritten blocks. So deleted series will be seen only locally. Plus every older block will have still thatseries
Solution:
Thanks
[slack]@jean-louis
for spotting this!The text was updated successfully, but these errors were encountered: