-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Feature/querysharding ii #1927
Merged
Merged
Feature/querysharding ii #1927
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
This reverts commit 55d41b9.
cyriltovena
reviewed
May 21, 2020
cyriltovena
reviewed
May 21, 2020
cyriltovena
reviewed
May 21, 2020
cyriltovena
reviewed
May 21, 2020
cyriltovena
reviewed
May 22, 2020
cyriltovena
reviewed
May 22, 2020
owen-d
force-pushed
the
feature/querysharding-ii
branch
from
May 22, 2020 14:03
7b14439
to
e8c9e66
Compare
Codecov Report
@@ Coverage Diff @@
## master #1927 +/- ##
=======================================
Coverage 61.58% 61.58%
=======================================
Files 149 149
Lines 11903 11903
=======================================
Hits 7331 7331
Misses 3989 3989
Partials 583 583 |
cyriltovena
reviewed
May 22, 2020
cyriltovena
approved these changes
May 22, 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 !
couple of test missing but nothing majors.
Awesome work !
cyriltovena
reviewed
May 26, 2020
cyriltovena
reviewed
May 26, 2020
cyriltovena
reviewed
May 26, 2020
cyriltovena
reviewed
May 26, 2020
cyriltovena
reviewed
May 26, 2020
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
Following on the tail of #1846, this PR constitutes the stitching & evaluation of sharded queries. For example,
However, this also includes filter queries, like:
Support
The current list of shardable optimizations include:
Vector Aggregation Expressions
Range Aggregation Expressions
Both
rate
andcount_over_time
are supported.Why
This allows loki to further parallelise queries. Importantly, it also helps us alleviate parallelization bottlenecks in split factor alone, because with small split factors, multiple queriers inevitably end up downloading the same sets of chunks. Sharding allows us to partition by a dimension other than time, allowing us to combine the two to achieve higher parallelizations with less work duplication.
How
In order to do this without copying some of the messier internals of cortexproject/cortex#1878, this PR extends the api to support a
shards
field which limits a query to one or more shard values determined by storage. This is only used between the query-frontend & queriers whenquerier.parallelise-shardable-queries
is enabled on the frontend.