Query all ingesters to mitigate 404s on rollout#557
Merged
annanay25 merged 8 commits intografana:masterfrom Mar 2, 2021
Merged
Query all ingesters to mitigate 404s on rollout#557annanay25 merged 8 commits intografana:masterfrom
annanay25 merged 8 commits intografana:masterfrom
Conversation
Signed-off-by: Annanay <annanayagarwal@gmail.com>
Signed-off-by: Annanay <annanayagarwal@gmail.com>
joe-elliott
requested changes
Feb 26, 2021
|
|
||
| reqs := make([]*http.Request, s.queryShards) | ||
| for i := 0; i < len(s.blockBoundaries)-1; i++ { | ||
| for i := 0; i < s.queryShards; i++ { |
Collaborator
There was a problem hiding this comment.
instead of creating block boundaries, it would be a lot cleaner to make a method that created a slice of structs that represented the query. like:
type queryParams struct {
queryShards bool
startBlock []byte
endBlock []byte
}
that would simplify this logic quite a bit and would be much easier to test as well.
Signed-off-by: Annanay <annanayagarwal@gmail.com>
Signed-off-by: Annanay <annanayagarwal@gmail.com>
Signed-off-by: Annanay <annanayagarwal@gmail.com>
joe-elliott
approved these changes
Mar 1, 2021
Collaborator
joe-elliott
left a comment
There was a problem hiding this comment.
Adding an approval b/c I think this is basically done, but there are a few nits.
Signed-off-by: Annanay <annanayagarwal@gmail.com>
Signed-off-by: Annanay <annanayagarwal@gmail.com>
Signed-off-by: Annanay <annanayagarwal@gmail.com>
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.
Signed-off-by: Annanay annanayagarwal@gmail.com
What this PR does:
This is an experimental PR to check if querying all ingesters helps mitigate 404s on rollouts/scaleups. Will also be monitoring performance as it queries a lot more ingesters every time.
The PR also simplifies the sharding logic and adds a QueryMode at the Querier. This can be set to "ingesters" / "blocks" / "all" (default) and will only query the specified components.
Notez:
Which issue(s) this PR fixes:
Attempts to fix #284 #38
Checklist
CHANGELOG.mdupdated - the order of entries should be[CHANGE],[FEATURE],[ENHANCEMENT],[BUGFIX]