-
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
tools: Added thanos bucket tool rewrite (e.g allowing block series deletions). #3421
Conversation
f82dfad
to
2ad9593
Compare
Required for CLI for deletions in Thanos: thanos-io/thanos#3421 Signed-off-by: Bartlomiej Plotka <[email protected]>
402131e
to
b7aefd0
Compare
b7aefd0
to
44f00ae
Compare
Example log:
|
de03c9b
to
40ca72d
Compare
c34fb32
to
9104db5
Compare
This looks really interesting! Excuse my likely ignorance, but I have a couple of observations/queries
|
* Exposed DeletionIterator and CompactMetas functions. Required for CLI for deletions in Thanos: thanos-io/thanos#3421 Signed-off-by: Bartlomiej Plotka <[email protected]> * Removed Thanos usage mentions. Signed-off-by: Bartlomiej Plotka <[email protected]>
Good questions @chadlwilson chadlwilson
Good point. Relabelling is amazing, although a bit hard to understand and configure correctly by users. Still, it's a plan to add relabelling on top of the existing deletion request. The main problem for me is that relabelling was made for labels NOW (discovery, scraping), so it's has no time awareness. So it's hard currently to define some relabelling for a certain time range (e.g delete series only from 2:00pm to 3:00pm). Unless we are ok to do it for the whole block always. OR we can extend relabelling to be time interval based. Any preferences?
Let's add that in later PRs. Usually, you need to remove some series if you have some corruption/problem with a particular block. To print all IDs for certain labels |
One useful feature in promtool is the But if we can expose this information via UI, then that would be perfect |
If we specify a block that doesn't have any matching series of the specified deletion requests, then we will still write a new block and flush it to the obj store? |
7cf2814
to
5590442
Compare
Fixed all, PTAL (: |
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.
7c740eb
to
a638117
Compare
PTAL 🤗 |
ping (: |
|
||
symbols, set, err := compactSeries(ctx, sReaders...) | ||
if err != nil { | ||
return errors.Wrapf(err, "compact series from %v", func() string { |
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.
:)
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.
sad (:
61d1ce2
to
6fa2dc0
Compare
Is this rdy to be merged? 🤗 |
6fa2dc0
to
870a9ce
Compare
…es deletions). Signed-off-by: Bartlomiej Plotka <[email protected]>
870a9ce
to
d0f3fbe
Compare
@bwplotka Are failing tests flaky ones? In any case, I have re-run them. We'll see soon enough |
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.
LGTM 💯 The flaky document checks fixed on master.
…es deletions). (thanos-io#3421) Signed-off-by: Bartlomiej Plotka <[email protected]> Signed-off-by: Oghenebrume50 <[email protected]>
Added rewrite tool:
Not that inefficient as for first iteration. Deleting ALL gauges from 2w 8.3mln series block while gathering changelog file took ~1m30s
Head of changelog for prod block I used:
cc @SuperQ, you might find it useful (:
Signed-off-by: Bartlomiej Plotka [email protected]
NOTE: Left for future PRs: