fix(store): correct estimated-max-chunk-size default in flag help#8903
Open
anxkhn wants to merge 1 commit into
Open
fix(store): correct estimated-max-chunk-size default in flag help#8903anxkhn wants to merge 1 commit into
anxkhn wants to merge 1 commit into
Conversation
The hidden --debug.estimated-max-chunk-size flag advertised a default of 16KiB in its help text, but its registered default is store.EstimatedMaxChunkSize, which is 16000 bytes (16KiB is 16384). Update the help to state 16000 so it matches the actual default. The sibling --debug.estimated-max-series-size flag is already consistent with its constant. No behavior change: only the help string is corrected. Signed-off-by: Anas Khan <83116240+anxkhn@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
The hidden
--debug.estimated-max-chunk-sizestore flag advertised a default of16KiBin its help text, but its registered default isstore.EstimatedMaxChunkSize, which is16000bytes (16KiBwould be16384).This corrects the help string to say
16000so it matches the actual default.For contrast, the sibling flag
--debug.estimated-max-series-sizeis alreadyconsistent: it says
64KBand its constantstore.EstimatedMaxSeriesSizeis64 * 1024.I used the literal
16000(rather than an approximation like~16KB) so thehelp matches
strconv.Itoa(store.EstimatedMaxChunkSize)exactly. The constant isnot a power of two, and this is also how the value is already described elsewhere
(the CHANGELOG for #2956 refers to "chunks bigger than 16000 bytes").
There is no behavior change: only the help string is corrected, the backing
constant is untouched.
Verification
go build ./cmd/thanos ./pkg/storepasses;gofmt -l cmd/thanos/store.goisclean;
go vet ./cmd/thanosis clean.16KiBand now emits16000for this flag's default.
Hidden(), so it is not rendered into--help/--help-longorinto any generated flag table under
docs/; there is nothing to regenerate andcheck-docsis unaffected (nodocs/file references this flag or the oldstring).