-
Notifications
You must be signed in to change notification settings - Fork 2.3k
store: Postings fetching optimizations #2294
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
62ef666
Avoid fetching duplicate keys.
pstibrany b80fcc4
Added shortcuts
pstibrany 280db8c
Optimize away fetching of ALL postings, if possible.
pstibrany 701d88e
Don't do individual index.Without, but merge them first.
pstibrany 02d87c9
Don't use map for fetching postings, but return slice instead.
pstibrany f3e1656
Renamed 'all' to 'allRequested'.
pstibrany ae3f5af
Typo
pstibrany 00b84f6
Make linter happy.
pstibrany b6f44ee
Added comment to fetchPostings.
pstibrany 68ba009
Group vars
pstibrany 0248583
Comments
pstibrany 6d8c48c
Use allPostings and emptyPostings variables for special cases.
pstibrany f23eb71
Unify terminology to "special All postings"
pstibrany c784dda
Address feedback.
pstibrany 5a13b8b
Added CHANGELOG.md entry.
pstibrany 7122161
Fix check for empty group.
pstibrany 658091d
Comment
pstibrany 029d301
Special All postings is now added as a new group
pstibrany d9396a9
Updated comment
pstibrany File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Typo
Signed-off-by: Peter Štibraný <peter.stibrany@grafana.com>
- Loading branch information
commit ae3f5af32d5aa99c8309187f7c5ae1f233925c7f
There are no files selected for viewing
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
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.
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
IsEmptyPostingsis a different guarantee... there can be labels that are not present in the block, and will also return empty postings.IsEmptyPostingsname would suggest that it returns true in such case, but it doesn't. On the other hand,IsAlwaysEmptyPostings(new suggested name) says that this will be empty no matter the block.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.
Removed this method in favor of checking for specific
emptyPostingsGroupsentinel value.Uh oh!
There was an error while loading. Please reload this page.
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.
And now removed check for sentinel value again, since it's incorrect. We really need to check if group is empty. There are other ways how group can be empty, e.g. by using
label="non-existant-value"matcher.