Skip to content

Conversation

@56quarters
Copy link
Contributor

@56quarters 56quarters commented Dec 11, 2025

What this PR does

Verify that the TSDB block index file uses v2 for the file format, not v1. The v1 format was only used for Prometheus 2.0 and 2.1 as far as I can tell. It hasn't been the default format for new blocks since Prometheus 2.2 and has never been the default for Mimir.

Which issue(s) this PR fixes or relates to

Part of #13808

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.

Note

Enforces v2 TSDB index format on uploaded blocks by validating index version during health checks, adds tests, and updates the changelog.

  • Compactor / TSDB index validation:
    • Add HealthStats.IndexFormat and UnsupportedIndexFormat(); only v2 (index.FormatV2) is accepted via SupportedIndexFormats.
    • GatherBlockHealthStats() records index file version; AnyErr() now fails on unsupported formats.
    • Tests cover new validation and existing error paths (TestHealthStats_AnyErr).
  • Docs:
    • Update CHANGELOG.md: require uploaded TSDB blocks to use v2 index format.

Written by Cursor Bugbot for commit 2477fd9. This will update automatically on new commits. Configure here.

Verify that the TSDB block index file uses v2 for the file format,
not v1. The v1 format was only used for Prometheus 2.0 and 2.1 as
far as I can tell. It hasn't been the default format for new blocks
since Prometheus 2.2 and has never been the default for Mimir.

Part of #13808
@56quarters 56quarters force-pushed the 56quarters/index-upload branch from 8108c6d to 2477fd9 Compare December 11, 2025 20:40
@56quarters 56quarters marked this pull request as ready for review December 11, 2025 20:57
@56quarters 56quarters requested a review from a team as a code owner December 11, 2025 20:57
Copy link
Contributor

@seizethedave seizethedave left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

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.

2 participants