Skip to content
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

Avoid logging and connection backoff in the case of a canceled context #4428

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
* [ENHANCEMENT] Reuse generator code to better refuse "too large" traces. [#4365](https://github.com/grafana/tempo/pull/4365) (@joe-elliott)
This will cause the ingester to more aggressively and correctly refuse traces. Also added two metrics to better track bytes consumed per tenant in the ingester.
`tempo_metrics_generator_live_trace_bytes` and `tempo_ingester_live_trace_bytes`.
* [ENHANCEMENT] Avoid logging and connection backoff in the case of a canceled context on the gRPC stream in querier. [#4428](https://github.com/grafana/tempo/pull/4428) (@teyyubismayil)
* [BUGFIX] Handle invalid TraceQL query filter in tag values v2 disk cache [#4392](https://github.com/grafana/tempo/pull/4392) (@electron0zero)
* [BUGFIX] Replace hedged requests roundtrips total with a counter. [#4063](https://github.com/grafana/tempo/pull/4063) [#4078](https://github.com/grafana/tempo/pull/4078) (@galalen)
* [BUGFIX] Metrics generators: Correctly drop from the ring before stopping ingestion to reduce drops during a rollout. [#4101](https://github.com/grafana/tempo/pull/4101) (@joe-elliott)
Expand Down
7 changes: 5 additions & 2 deletions modules/querier/worker/frontend_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,11 @@ func (fp *frontendProcessor) processQueriesOnSingleStream(ctx context.Context, c
for backoff.Ongoing() {
c, err := client.Process(ctx)
if err != nil {
level.Error(fp.log).Log("msg", "error contacting frontend", "address", address, "err", err)
backoff.Wait()
// Avoid logging and connection backoff in the case of a canceled context on the gRPC stream. This will allow queriers to reconnect and work more quickly.
if status.Code(err) != codes.Canceled {
level.Error(fp.log).Log("msg", "error contacting frontend", "address", address, "err", err)
backoff.Wait()
}
continue
}

Expand Down
Loading