Skip to content

Commit

Permalink
Merge pull request #86208 from cockroachdb/blathers/backport-release-…
Browse files Browse the repository at this point in the history
…22.1-86160

release-22.1: colexecerror: do not annotate the context canceled error
  • Loading branch information
yuzefovich authored Aug 16, 2022
2 parents 9b8a6af + e148916 commit be21556
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pkg/sql/colexecerror/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,11 @@ func CatchVectorizedRuntimeError(operation func()) (retErr error) {

annotateErrorWithoutCode := true
var nie *notInternalError
if errors.As(err, &nie) {
// A notInternalError was not caused by the vectorized engine and
// represents an error that we don't want to annotate in case it
// doesn't have a valid PG code.
if errors.Is(err, context.Canceled) || errors.As(err, &nie) {
// We don't want to annotate the context cancellation and
// notInternalError errors in case they don't have a valid PG code
// so that the sentry report is not sent (errors with failed
// assertions get sentry reports).
annotateErrorWithoutCode = false
}
if code := pgerror.GetPGCode(err); annotateErrorWithoutCode && code == pgcode.Uncategorized {
Expand Down

0 comments on commit be21556

Please sign in to comment.