Skip to content

fix(store): correct estimated-max-chunk-size default in flag help#8903

Open
anxkhn wants to merge 1 commit into
thanos-io:mainfrom
anxkhn:fix/estimated-max-chunk-size-help-default
Open

fix(store): correct estimated-max-chunk-size default in flag help#8903
anxkhn wants to merge 1 commit into
thanos-io:mainfrom
anxkhn:fix/estimated-max-chunk-size-help-default

Conversation

@anxkhn

@anxkhn anxkhn commented Jul 7, 2026

Copy link
Copy Markdown
  • I added CHANGELOG entry for this change.
  • Change is not relevant to the end user.

Changes

The hidden --debug.estimated-max-chunk-size store flag advertised a default of
16KiB in its help text, but its registered default is
store.EstimatedMaxChunkSize, which is 16000 bytes (16KiB would be 16384).
This corrects the help string to say 16000 so it matches the actual default.

For contrast, the sibling flag --debug.estimated-max-series-size is already
consistent: it says 64KB and its constant store.EstimatedMaxSeriesSize is
64 * 1024.

- ... Default value is 16KiB.
+ ... Default value is 16000.

I used the literal 16000 (rather than an approximation like ~16KB) so the
help matches strconv.Itoa(store.EstimatedMaxChunkSize) exactly. The constant is
not 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/store passes; gofmt -l cmd/thanos/store.go is
    clean; go vet ./cmd/thanos is clean.
  • Built the binary and confirmed it no longer emits 16KiB and now emits 16000
    for this flag's default.
  • The flag is Hidden(), so it is not rendered into --help/--help-long or
    into any generated flag table under docs/; there is nothing to regenerate and
    check-docs is unaffected (no docs/ file references this flag or the old
    string).

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant