-
Notifications
You must be signed in to change notification settings - Fork 799
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
Regex set optimization when querying for chunks in index #2446
Merged
pstibrany
merged 7 commits into
cortexproject:master
from
pstibrany:regex-set-optimization
Apr 15, 2020
Merged
Regex set optimization when querying for chunks in index #2446
pstibrany
merged 7 commits into
cortexproject:master
from
pstibrany:regex-set-optimization
Apr 15, 2020
Conversation
This file contains 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
pstibrany
changed the title
Regex set optimization
Regex set optimization when fetching chunks
Apr 10, 2020
pstibrany
changed the title
Regex set optimization when fetching chunks
Regex set optimization when querying for chunks in index
Apr 10, 2020
gouthamve
approved these changes
Apr 14, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks @pstibrany! There is conflict but other than that, I think this ready to go!
…kIdsByMetricNameMatcher. Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
pracucci
approved these changes
Apr 15, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very good job @pstibrany! LGTM 👏
Thanks for reviews! |
gouthamve
added a commit
to gouthamve/cortex
that referenced
this pull request
Apr 16, 2020
Similar to cortexproject#2446 Super useful for templated grafana dashboards which send matchers such as =~"a|b|c|d|" Signed-off-by: Goutham Veeramachaneni <gouthamve@gmail.com>
3 tasks
2 tasks
gouthamve
added a commit
that referenced
this pull request
Apr 17, 2020
* Regex set optimisation when looking series in ingester Similar to #2446 Super useful for templated grafana dashboards which send matchers such as =~"a|b|c|d|e" Signed-off-by: Goutham Veeramachaneni <gouthamve@gmail.com> * Add CHANGELOG entry Signed-off-by: Goutham Veeramachaneni <gouthamve@gmail.com> * Add benchmark for set optimisation Signed-off-by: Goutham Veeramachaneni <gouthamve@gmail.com>
cyriltovena
pushed a commit
to cyriltovena/loki
that referenced
this pull request
Jun 11, 2021
* Regex set optimisation when looking series in ingester Similar to cortexproject/cortex#2446 Super useful for templated grafana dashboards which send matchers such as =~"a|b|c|d|e" Signed-off-by: Goutham Veeramachaneni <gouthamve@gmail.com> * Add CHANGELOG entry Signed-off-by: Goutham Veeramachaneni <gouthamve@gmail.com> * Add benchmark for set optimisation Signed-off-by: Goutham Veeramachaneni <gouthamve@gmail.com>
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.
This PR implements "regex set" optimization when querying chunks in index. If label matcher is in form label=~"a|b", then we can simply query index for label=a, label=b. This reduces number of fetched chunk IDs and matching we need to do in memory. (This is similar optimization to what Prometheus has in TSDB layer)
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]
/cc @codesome