Skip to content

Pushdown collection of results from generators in the querier#4119

Merged
electron0zero merged 3 commits intografana:mainfrom
electron0zero:collection_generators
Oct 11, 2024
Merged

Pushdown collection of results from generators in the querier#4119
electron0zero merged 3 commits intografana:mainfrom
electron0zero:collection_generators

Conversation

@electron0zero
Copy link
Copy Markdown
Member

@electron0zero electron0zero commented Sep 24, 2024

What this PR does:

Iterating and then collecting the results was sync and a bottleneck for the ingester queries, and we fixed that in #4100. we did it by pushing down the collection of results and that makes it a parallel and removes the iteration step.

we can do the same for the call to generators in the queries and make them fast.

this is a follow up on #4100, as discussed #4100 (comment)

along with these changes, removed the type assertions and use of interface{} return types from forGivenGenerators and callback function forEachGeneratorFn

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]

@electron0zero electron0zero force-pushed the collection_generators branch 2 times, most recently from 80f9608 to ce0ec8b Compare September 25, 2024 09:42
@electron0zero electron0zero marked this pull request as ready for review September 25, 2024 09:42
@electron0zero electron0zero self-assigned this Oct 1, 2024
@electron0zero electron0zero force-pushed the collection_generators branch from ce0ec8b to fe88da5 Compare October 1, 2024 08:31
@electron0zero electron0zero force-pushed the collection_generators branch from fe88da5 to 918ba4f Compare October 1, 2024 13:44
Copy link
Copy Markdown
Contributor

@mapno mapno left a comment

Choose a reason for hiding this comment

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

LGTM

@electron0zero electron0zero merged commit ce317a8 into grafana:main Oct 11, 2024
@electron0zero electron0zero deleted the collection_generators branch October 11, 2024 20:13
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.

3 participants