Speedup collection of results from ingesters in the querier#4100
Merged
electron0zero merged 12 commits intografana:mainfrom Sep 25, 2024
Merged
Speedup collection of results from ingesters in the querier#4100electron0zero merged 12 commits intografana:mainfrom
electron0zero merged 12 commits intografana:mainfrom
Conversation
40bbcb8 to
708508f
Compare
708508f to
2b8b2b1
Compare
b9450d7 to
d45a9f0
Compare
d45a9f0 to
f3c7600
Compare
mdisibio
reviewed
Sep 23, 2024
3 tasks
mapno
approved these changes
Sep 25, 2024
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does:
Earlier we used to make calls to ingesters, get results and itarate over these results to collect them and then return them to query-frontend.
Iterating and then collecting the results was sync and a bottleneck and showed up in traces and profiles.
This PR pushed down the collection of results and that makes it a parallel and removes the iteration step.
now we query an ingester and collect the results where we query, and once all ingesters response, we read the collected results and return them to query-frontend for further combining.
see this trace for example:

along with these changes, It also does the following:
interface{}return types fromforIngesterRingsand callback functionforEachFnWhich issue(s) this PR fixes:
Fixes #
Checklist
CHANGELOG.mdupdated - the order of entries should be[CHANGE],[FEATURE],[ENHANCEMENT],[BUGFIX]