Skip to content

Commit

Permalink
kv: don't log trace of cancelled requests if not Export
Browse files Browse the repository at this point in the history
This commit limits the logging added in #106611 to only apply to Export
requests. The logging has been observed to be noisy and we'd like to
avoid any perceived regression in a v23.1 patch release.

Epic: None
Release note: None
  • Loading branch information
nvanbenschoten committed Aug 18, 2023
1 parent 2ce2de1 commit 9a42623
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/server/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -1238,7 +1238,9 @@ func (n *Node) batchInternal(
// replica to notice the cancellation and return a response. For this reason,
// we log the server-side trace of the cancelled request to help debug what
// the request was doing at the time it noticed the cancellation.
if pErr != nil && ctx.Err() != nil {
// NOTE: we only log on Export requests to avoid this causing log spam in this
// backported version of the code.
if pErr != nil && ctx.Err() != nil && args.IsSingleExportRequest() {
if sp := tracing.SpanFromContext(ctx); sp != nil && !sp.IsNoop() {
recording := sp.GetConfiguredRecording()
if recording.Len() != 0 {
Expand Down

0 comments on commit 9a42623

Please sign in to comment.