-
Notifications
You must be signed in to change notification settings - Fork 512
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-frontend worker: don't treat cancel as an error #4648
Conversation
5c5abfc
to
837fbbb
Compare
@@ -14,6 +14,7 @@ import ( | |||
"github.com/go-kit/log" | |||
"github.com/go-kit/log/level" | |||
"github.com/grafana/dskit/backoff" | |||
grpcUtils "github.com/weaveworks/common/grpc" |
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.
Package names, and aliases, should be all lowercase, so grpcutil
.
Also an opinionated nit, but in this case I'd call it commongrpc
.
Can we write a test for this? These issues keep biting us again and again. |
fdc264f
to
c4b424a
Compare
I found it hard to think of a generic test to catch such issues by behaviour, but we could check all the logs from integration tests for the string "context canceled". |
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, a test would be great, but I think we should prioritize delivering this. If we merge without a test, we could create a good-first-issue
labeled issue to write a test.
There are lots of reports when querier shuts down, e.g. here:
In
|
c4b424a
to
7179da5
Compare
The CHANGELOG has just been cut to prepare for the next Mimir release. Please rebase |
7179da5
to
791a7ef
Compare
Could be the user closed the tab, or it's a sharded query and some other shard errored. Whatever the cause, cancellation is not an error. I expect two effects: the worker won't log "context canceled", and it will process the next request immediately.
9651fc1
to
4cddb6a
Compare
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.
I reviewed this post-merge and noticed that we likely need to make the same change for the case where the query-scheduler is in use here.
(frontendProcessor
is only used by queriers when the query-scheduler is not in use.)
Thanks for the pointer - filed #6767 |
Mistake in #4648. Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
Mistake in #4648. Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
What this PR does
When a query returns an error value, check whether that error is actually a cancellation before acting.
I expect two effects: the worker won't log "context canceled", and it will process the next request immediately.
Could be the user closed the tab, or it's a sharded query and some other shard errored. Whatever the cause, cancellation is not an error.
Checklist
CHANGELOG.md
updated