8000 feat(metastore): shard sections queries over index files by ivkalita · Pull Request #20134 · grafana/loki · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@ivkalita
Copy link
Contributor
@ivkalita ivkalita commented Dec 5, 2025

What this PR does / why we need it:

Running metastore queriesin a distributed manner using query engine workers:

  • Build a distributed metastore plan from GetIndexes and execute it via the v2 scheduler/worker pipeline
  • Split the request into per-index PointersScan tasks, then fan-in and CollectSections to produce final section descriptors
  • Add physical plan + protobuf support for Merge/PointersScan, improve tracing/cleanup, and add coverage for planner/workflow/proto roundtrips
    feat(metastore): distributed metastore queries execution

Special notes for your reviewer:

This PR is based on top of

Checklist

  • Reviewed the CONTRIBUTING.md guide (required)
  • Documentation added
  • Tests updated
  • Title matches the required conventional commits format, see here
    • Note that Promtail is considered to be feature complete, and future development for logs collection will be in Grafana Alloy. As such, feat PRs are unlikely to be accepted unless a case can be made for the feature actually being a bug fix to existing behavior.
  • Changes that require user attention or interaction to upgrade are documented in docs/sources/setup/upgrade/_index.md
  • If the change is deprecating or removing a configuration option, update the deprecated-config.yaml and deleted-config.yaml files respectively in the tools/deprecated-config-checker directory. Example PR
  • Change the base branch to main once feat(metastore): metastore DI #20253 is merged

@ivkalita ivkalita force-pushed the ivkalita/metastore-distributed branch from b8abe5e to 15e2ffa Compare December 5, 2025 13:34
@ivkalita ivkalita changed the title feature(metastore): query metastore before building physical plan feat(metastore): query metastore before building physical plan Dec 5, 2025
@ivkalita ivkalita force-pushed the ivkalita/metastore-distributed branch from 623f0ab to 3b0f256 Compare December 9, 2025 09:27
@ivkalita ivkalita changed the title feat(metastore): query metastore before building physical plan feat(metastore): query metastore before building physical plan (POC) Dec 10, 2025
@ivkalita ivkalita force-pushed the ivkalita/metastore-distributed branch from 3b0f256 to fb14c2f Compare December 10, 2025 11:42
@github-actions
Copy link
Contributor
github-actions bot commented Dec 10, 2025

💻 Deploy preview available (feat(metastore): query metastore before building physical plan (POC)):

@ivkalita ivkalita force-pushed the ivkalita/metastore-distributed branch from fb14c2f to 78945e5 Compare December 11, 2025 13:57
@ivkalita ivkalita force-pushed the ivkalita/metastore-distributed branch 2 times, most recently from 7fc0687 to b0b6541 Compare December 17, 2025 15:50
@ivkalita ivkalita changed the title feat(metastore): query metastore before building physical plan (POC) feat(metastore): shard sections queries over index files Dec 17, 2025
@ivkalita ivkalita changed the base branch from main to ivkalita/metastore-di December 17, 2025 15:58
@ivkalita ivkalita force-pushed the ivkalita/metastore-di branch from 373565e to 27b42f4 Compare December 18, 2025 12:49
Base automatically changed from ivkalita/metastore-di to main December 18, 2025 13:06
@ivkalita ivkalita force-pushed the ivkalita/metastore-distributed branch from b0b6541 to 5515873 Compare December 18, 2025 13:12
- Build a distributed metastore plan from GetIndexes and execute it via the v2 scheduler/worker pipeline
- Split the request into per-index PointersScan tasks, then fan-in and CollectSections to produce final section descriptors
- Add physical plan + protobuf support for Merge/PointersScan, improve tracing/cleanup, and add coverage for planner/workflow/proto roundtrips
feat(metastore): distributed metastore queries execution
@ivkalita ivkalita force-pushed the ivkalita/metastore-distributed branch from 71ab37a to 501dce4 Compare December 19, 2025 10:18
@ivkalita ivkalita marked this pull request as ready for review December 19, 2025 11:57
@ivkalita ivkalita requested a review from a team as a code owner December 19, 2025 11:57
Copy link
Contributor
@benclive benclive left a comment

Choose a reason for hiding this comment

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

Discussed offline: This LGTM, I'm happy with how it's implement and I'm willing to merge it to unblock other work and follow up on any minor issues later.
I left a couple of questions but neither are blocking.

return translateEOFPipeline{pipeline}
}

type translateEOFPipeline struct {
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this need to be a pipeline? Could it be a standard function wrapping the error?

Start: start,
End: end,

MaxTimeRange: TimeRange{
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we have two start/end ranges here?

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0