Skip to content

Compactor: honor the per-tenant float chunk encoding - #16488

Draft
roidelapluie wants to merge 1 commit into
grafana:mainfrom
roidelapluie:roidelapluie/float-chunk-encoding-shared-table
Draft

Compactor: honor the per-tenant float chunk encoding#16488
roidelapluie wants to merge 1 commit into
grafana:mainfrom
roidelapluie:roidelapluie/float-chunk-encoding-shared-table

Conversation

@roidelapluie

@roidelapluie roidelapluie commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

The split-and-merge compactor built a single LeveledCompactor with no FloatChunkEncoding, so the merge function re-encoded overlapping float chunks as xor, undoing float_chunk_encoding=xor2 for the tenants that set it. Build one compactor per tenant instead, capturing the encoding as a constant so it cannot change mid-compaction. The metrics stay shared, so exported metrics are unchanged.

The accepted values now come from a single table in pkg/util/validation, used by the flag default and help, the limit validation, the ingester and the overrides-exporter, which each had their own copy of the mapping. No behaviour change there.

What this PR does

Which issue(s) this PR fixes or relates to

Fixes #

Checklist

  • Tests updated.
  • Documentation added.
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]. If changelog entry is not needed, please add the changelog-not-needed label to the PR.
  • about-versioning.md updated with experimental features.

The split-and-merge compactor built a single LeveledCompactor with no
FloatChunkEncoding, so the merge function re-encoded overlapping float chunks as
xor, undoing float_chunk_encoding=xor2 for the tenants that set it. Build one
compactor per tenant instead, capturing the encoding as a constant so it cannot
change mid-compaction. The metrics stay shared, so exported metrics are
unchanged.

The accepted values now come from a single table in pkg/util/validation, used by
the flag default and help, the limit validation, the ingester and the
overrides-exporter, which each had their own copy of the mapping. No behaviour
change there.

Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
@roidelapluie
roidelapluie requested review from a team as code owners August 27, 2026 12:24
@roidelapluie
roidelapluie marked this pull request as draft August 27, 2026 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant