-
Notifications
You must be signed in to change notification settings - Fork 528
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
Query all ingesters to mitigate 404s on rollout #557
Conversation
Signed-off-by: Annanay <[email protected]>
Signed-off-by: Annanay <[email protected]>
@@ -63,15 +66,15 @@ func (s shardQuery) Do(r *http.Request) (*http.Response, error) { | |||
} | |||
|
|||
reqs := make([]*http.Request, s.queryShards) | |||
for i := 0; i < len(s.blockBoundaries)-1; i++ { | |||
for i := 0; i < s.queryShards; i++ { |
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.
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 <[email protected]>
Signed-off-by: Annanay <[email protected]>
Signed-off-by: Annanay <[email protected]>
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.
Adding an approval b/c I think this is basically done, but there are a few nits.
Signed-off-by: Annanay <[email protected]>
Signed-off-by: Annanay <[email protected]>
Signed-off-by: Annanay <[email protected]>
Signed-off-by: Annanay [email protected]
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.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]