Skip to content

Extend block finder get blocks interface with matchers #6962

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 12, 2025

Conversation

yeya24
Copy link
Contributor

@yeya24 yeya24 commented Aug 11, 2025

What this PR does:

This PR extends the BlockFinder interface's GetBlocks method to accept the list of query matchers. This allows downstream projects to extend the block finding strategy to allow experimenting with some different partitioning strategies.

We are testing it out with TSDB blocks partitioned by metric name. By passing the list of matchers when finding blocks, this allows us to filter out blocks that won't have the metric name at all so we query fewer blocks. We will try to upstream this soon.

There is no any user facing change in this PR other than the interface change.

Which issue(s) this PR fixes:
Fixes #

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

Copy link
Member

@alanprot alanprot left a comment

Choose a reason for hiding this comment

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

thanks

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Aug 11, 2025
yeya24 added 2 commits August 11, 2025 16:55
Signed-off-by: yeya24 <[email protected]>
Signed-off-by: yeya24 <[email protected]>
@pull-request-size pull-request-size bot added size/L and removed size/M labels Aug 12, 2025
@yeya24 yeya24 merged commit cadf00f into cortexproject:master Aug 12, 2025
33 of 34 checks passed
aclaygray pushed a commit to aclaygray/cortex that referenced this pull request Aug 18, 2025
…#6962)

* extend block finder get blocks interface with matchers

Signed-off-by: yeya24 <[email protected]>

* fix build

Signed-off-by: yeya24 <[email protected]>

* fix tests

Signed-off-by: yeya24 <[email protected]>

---------

Signed-off-by: yeya24 <[email protected]>
Signed-off-by: Andrew Gray <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/querier lgtm This PR has been approved by a maintainer size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants