Skip to content
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

Read path for RF1 generator blocks [3 of 3] #3723

Merged
merged 8 commits into from
May 31, 2024
Merged

Conversation

mapno
Copy link
Member

@mapno mapno commented May 28, 2024

What this PR does:

Follow-up to #3691.

Adds the ability to query generator blocks (RF=1) for TraceQL metrics. If frontend.metrics.query_generator_blocks is set to true, the frontend will use the new query path and build requests only targeting blocks with ReplicationFactor=1.

This allows for more efficient query sharding—because there's no need to dedup data, querier jobs can target blocks or portions of them, instead of each job opening all blocks.

Checklist

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

@mapno mapno force-pushed the rf1-read-path branch 2 times, most recently from cabb7ef to 0bc707b Compare May 28, 2024 15:26
@mapno mapno marked this pull request as ready for review May 31, 2024 12:43
modules/querier/querier_query_range.go Outdated Show resolved Hide resolved
@@ -628,6 +628,10 @@ func optimize(req *FetchSpansRequest) {
req.SecondPassConditions = nil
}
}

if len(req.SecondPassConditions) == 0 {
Copy link
Contributor

Choose a reason for hiding this comment

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

Note: This fixes a performance regression unrelated to this PR.

modules/querier/querier_query_range.go Outdated Show resolved Hide resolved
modules/frontend/metrics_query_range_sharder.go Outdated Show resolved Hide resolved
modules/frontend/metrics_query_range_sharder.go Outdated Show resolved Hide resolved
@mdisibio mdisibio enabled auto-merge (squash) May 31, 2024 17:41
@mdisibio mdisibio merged commit b4514b9 into grafana:main May 31, 2024
15 checks passed
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