Skip to content

Conversation

@56quarters
Copy link
Contributor

@56quarters 56quarters commented Dec 12, 2025

What this PR does

This change removes support for generating index-headers from and reading the v1 format of TSDB index files. The v1 format was only the default in Prometheus 2.0 and 2.1. Prometheus 2.2 and later default to creating blocks that use the v2 format. The v1 format has never been the default in Mimir.

Note that this change does not refactor or change index-header code beyond removing v1 support. Further cleanups will be done in follow up PRs.

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

Remove TSDB index v1 support (store-gateway/index-header), simplify code to v2-only, rename sparse helpers, update tests, and add changelog entry.

  • Store-gateway / Index-header:
    • Drop TSDB index v1 support; newChunkedIndexReader() and NewPostingOffsetTable() now accept only index.FormatV2.
    • Simplify symbols handling to v2-only in index/symbols.go and reader logic.
  • APIs/Renames:
    • Rename helpers for sparse persistence: NewSparsePostingOffsetTable()ToSparsePostingOffsetTable(), NewSparseSymbol()ToSparseSymbols(); update call sites in stream_binary_reader.go and tests.
  • Code removal/cleanup:
    • Remove v1 PostingOffsetTableV1 implementation and related parsing code.
    • Remove v1-specific symbol lookup/reader paths.
  • Tests/Testdata:
    • Delete v1 tests and fixtures; update remaining tests to v2-only and new method names.
  • Changelog:
    • Add entry: Store-gateway removes support for generating index-headers from TSDB blocks using index v1.

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

This change removes support for generating index-headers and reading
the v1 format of TSDB index files. The v1 format was only the default
in Prometheus 2.0 and 2.1. Prometheus 2.2 and later default to creating
blocks that use the v2 format. The v1 format has never been the default
in Mimir.

Note that this change does not refactor or change index-header code
beyond removing v1 support. Further cleanups will be done in follow
up PRs.

Part of #13808

Signed-off-by: Nick Pillitteri <[email protected]>
@56quarters 56quarters marked this pull request as ready for review December 12, 2025 16:36
@56quarters 56quarters requested a review from a team as a code owner December 12, 2025 16:36
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we still want to git-keep this directory?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The chunks directory inside index_format_v1? No, we're removing the test data for the v1 format of the TSDB index unless I'm misunderstanding what you're asking.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah the GitHub diff description Whitespace-only changes. made it look like the file still existed - now that I pulled I can see the whole directory's gone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants