Skip to content

Commit

Permalink
Merge pull request #109041 from cockroachdb/blathers/backport-release…
Browse files Browse the repository at this point in the history
…-23.1.9-rc-109030

release-23.1.9-rc: kv: don't log trace of cancelled requests if not Export
  • Loading branch information
nvanbenschoten authored Aug 19, 2023
2 parents 2ce2de1 + 9a42623 commit a0eff47
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 a0eff47

Please sign in to comment.