Skip to content

Parquet: add row range constraints cache#7478

Open
siddarth2810 wants to merge 6 commits intocortexproject:masterfrom
siddarth2810:parquet-row-ranges-cache
Open

Parquet: add row range constraints cache#7478
siddarth2810 wants to merge 6 commits intocortexproject:masterfrom
siddarth2810:parquet-row-ranges-cache

Conversation

@siddarth2810
Copy link
Copy Markdown
Contributor

@siddarth2810 siddarth2810 commented May 5, 2026

What this PR does:
When Cortex filters parquet blocks during queries, it computes which row ranges match the query constraints. This PR adds caching for parquet row-range filtering.

The cache is wired into both Querier and Store Gateway parquet query paths.

Which issue(s) this PR fixes:
Fixes #7139

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]
  • docs/configuration/v1-guarantees.md updated if this PR introduces experimental flags

Implement a parquet-common RowRangesForConstraintsCache backed by Cortex cache
backends. Encode row ranges into a compact binary format and hash cache keys so
they are safe for memcached and other shared cache backends.

Signed-off-by: Siddarth Gundu <siddarthg0910@gmail.com>
Add bucket-store config for the parquet row ranges cache, create the
backend cache for parquet queryable

Signed-off-by: Siddarth Gundu <siddarthg0910@gmail.com>
Signed-off-by: Siddarth Gundu <siddarthg0910@gmail.com>
Signed-off-by: Siddarth Gundu <siddarthg0910@gmail.com>
@siddarth2810 siddarth2810 changed the title [Draft] Parquet: add row range constraints cache Parquet: add row range constraints cache May 6, 2026
Copy link
Copy Markdown
Member

@friedrichg friedrichg left a comment

Choose a reason for hiding this comment

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

Direction looks good to me. Clean implementation following existing cache patterns. Only minor nit: the cfg.MultiLevel.BackFillTTL = cfg.TTL line in RegisterFlagsWithPrefix is dead code since CreateParquetRowRangesCache re-sets it.

@siddarth2810
Copy link
Copy Markdown
Contributor Author

Direction looks good to me. Clean implementation following existing cache patterns. Only minor nit: the cfg.MultiLevel.BackFillTTL = cfg.TTL line in RegisterFlagsWithPrefix is dead code since CreateParquetRowRangesCache re-sets it.

I see, will remove that dead code. Thank you so much :)

Signed-off-by: Siddarth Gundu <siddarthg0910@gmail.com>
Signed-off-by: Siddarth Gundu <siddarthg0910@gmail.com>
@siddarth2810 siddarth2810 marked this pull request as ready for review May 7, 2026 13:58
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.

[Parquet] Support row range constraints cache

2 participants