-
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 remove flag on bucket mark command to remove deletion, no-downsample or no-compact markers on the block #5977
Conversation
9b30338
to
be128f2
Compare
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.
Thanks, one small comment, but it looks good to me 👍
pkg/block/block.go
Outdated
return errors.Wrapf(err, "check if %s file exists in bucket", markedFile) | ||
} | ||
if !markedFileExists { | ||
level.Warn(logger).Log("msg", "requested to unmark, but file does not exist; this should not happen; investigate", "err", errors.Errorf("file %s does not exist in bucket", markedFile)) |
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.
level.Warn(logger).Log("msg", "requested to unmark, but file does not exist; this should not happen; investigate", "err", errors.Errorf("file %s does not exist in bucket", markedFile)) | |
level.Warn(logger).Log("msg", "requested to unmark, but file does not exist", "err", errors.Errorf("file %s does not exist in bucket", markedFile)) |
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.
Done.
be128f2
to
13823f8
Compare
We just added the new No downsample marker so please also add that. |
0675b47
to
fcbd5ba
Compare
@yeya24. Included no-downsample marker as well |
187290f
to
4e0d60f
Compare
Overall this pr looks good. But I am just kind of unsure if we want a new command |
@yeya, I thought having a |
We can just make it optional if it is unmark operation.
Either option is ok to me but would love to hear more from the community and other maintainers. |
Hi @fpetkovski, Any thoughts on whether this functionality should be a separate command or another flag on the existing command? |
I think adding a |
4e0d60f
to
11ca4d5
Compare
536f067
to
c2003e5
Compare
…o-downsample or no-compact markers on the blocks. Signed-off-by: maheshbaliga <[email protected]>
c2003e5
to
112fc5f
Compare
Hi @yeya24, @fpetkovski I have made the required changes. Kindly re-review the same. |
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.
Thanks!
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.
Thanks for the contribution 👍
…o-downsample or no-compact markers on the blocks. (thanos-io#5977) Signed-off-by: maheshbaliga <[email protected]> Signed-off-by: maheshbaliga <[email protected]>
Closes #5946
Changes
Added
remove
flag onthanos tools bucket mark
command to remove the deletion, no-downsample and no-compact markers that were added on the block.Verification
Tested the changes by building the CLI and running the new command to check if the marker files were deleted. Also, added unit tests for the new functionality.