-
Notifications
You must be signed in to change notification settings - Fork 512
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
markblocks
tool to mark blocks for deletion or as non-compactable
#1551
Conversation
If we make this more general and allow uploading "deletion marker" files as well, we can get rid of our internal "delete_blocks.sh" script. This script also checks if block's meta.json file actually exists, before uploading marker file, and has support for multiple blocks at once. What do you think about extending this PR to cover these use cases (deletion marker, check for blocks, multiple blocks)? (Our script also supports |
Ref: grafana/mimir-squad#453 I think we should have this commited in the repo rather than having to look for it in issue comments. Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
Also allow multiple blocks, and check for block & mark existence. Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
64a0b6b
to
9db3c24
Compare
markblocks
tool to mark blocks for deletion or as non-compactable
Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
This is ready for review, I'd like to hear opinions on the FlagSet change to an interface. If we're not comfortable with that, I can rollback it and use plain flags, with the usual text saying something like:
|
I think we should do this (revert to |
We can also make this two separate cli tools, if you think that works better (mark-no-compact, mark-delete). For "mark-delete" I expect to add "--partial" flag soon, to support partial blocks (they don't have "meta.json" file but we can still check for index or chunks/000001 instead). |
Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
I plan to start referencing this tool from our playbooks. Should we eventually move it under |
There are no out-of-order chunks in source blocks in our original issue. Chunks have invalid min/max time specified, which causes that resulting block from compaction has out-of-order chunks. |
When in doubt, I'd always say "document it". If nothing else a brief README with a summary of the intended use case and a single example of usage would really nicely complement the help output from the CLI tool. The docs don't need to be perfect and aimed at new users yet, just enough that anyone that comes across this tool can understand it without having to read the code. |
Btw, we have our tools documented in |
Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
Addressed all the feedback, and wrote some docs under Also split the help output into basic and full, since there's an overwhelming amount of bucket configuration flags.
|
I still see some unaddressed comments. (Split of help is very nice, would be nice to have in all our tools.) |
Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
Shame on me, I should have reviewed the conversation again before stating that. 🤦 |
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, thank you for committing this :) left a nit and a comment about full-help
and help-all
Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
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.
Thank you, let's get this in! This is very useful tool to have in Mimir, instead of just our internal scripts.
Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
What this PR does
I think we should have this committed in the repo rather than having to look for it in issue comments.
Which issue(s) this PR fixes or relates to
Ref: #1537
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]