-
Notifications
You must be signed in to change notification settings - Fork 544
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
copyblocks: add option to bypass duration check for no-compact blocks #9439
Conversation
The CHANGELOG has just been cut to prepare for the next release. Please rebase |
afb5414
to
9dd8f6b
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.
Option seems good but the name is a bit confusing to me. Is there a way to rename it to be more obvious what it does? Maybe -disable-no-compact-validation
or something? I don't feel strongly so if you are good with the current name feel free to merge as-is.
I struggled with the name as well. Open to ideas for it and I'll hold off while trying to think of something myself. |
tools/copyblocks/main.go
Outdated
@@ -59,6 +60,7 @@ func (c *config) registerFlags(f *flag.FlagSet) { | |||
f.Var(&c.enabledUsers, "enabled-users", "If not empty, only blocks for these users are copied.") | |||
f.Var(&c.disabledUsers, "disabled-users", "If not empty, blocks for these users are not copied.") | |||
f.BoolVar(&c.dryRun, "dry-run", false, "Don't perform any copy; only log what would happen.") | |||
f.BoolVar(&c.anyNoCompactBlockDuration, "any-no-compact-block-duration", false, "If set, blocks marked as no-compact are not checked against min-block-duration") |
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.
How about --skip-no-compact-block-duration-check
?
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.
That is way more clear. I'll change it to that, 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.
🔥 Works for me
What this PR does
Adds a flag to bypass the block duration check in
copyblocks
for blocks marked as no-compact.It's a common pattern to use
min-block-duration
with the intent of targeting blocks that are fully compacted. This can miss blocks that are marked asno-compact
that have a shorter duration. This flag makes it easier to not miss those blocks.Which issue(s) this PR fixes or relates to
Fixes N/A
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]
.about-versioning.md
updated with experimental features.