From 9a42623dd3160b7132e9f1de3f7606bcfb0850d4 Mon Sep 17 00:00:00 2001 From: Nathan VanBenschoten Date: Fri, 18 Aug 2023 18:37:27 +0000 Subject: [PATCH] kv: don't log trace of cancelled requests if not Export 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 --- pkg/server/node.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/server/node.go b/pkg/server/node.go index dd5a4a5797c4..21c4689fe613 100644 --- a/pkg/server/node.go +++ b/pkg/server/node.go @@ -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 {