From 58f7f12ee9b3616938d53f13e1a2ecc88b900618 Mon Sep 17 00:00:00 2001 From: Michael Erickson Date: Thu, 10 Aug 2023 12:21:29 -0700 Subject: [PATCH] sql: autoretry transactions on IsSQLRetryableErrors Informs: #102839 Release note: None --- pkg/sql/conn_executor.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/sql/conn_executor.go b/pkg/sql/conn_executor.go index 4cd4ef5ade77..2429eb4e5ddb 100644 --- a/pkg/sql/conn_executor.go +++ b/pkg/sql/conn_executor.go @@ -3281,7 +3281,8 @@ func errIsRetriable(err error) bool { // client in implicit transactions. This is not great; it should // be marked as a client visible retry error. errors.Is(err, descidgen.ErrDescIDSequenceMigrationInProgress) || - descs.IsTwoVersionInvariantViolationError(err) + descs.IsTwoVersionInvariantViolationError(err) || + pgerror.IsSQLRetryableError(err) } // convertRetriableErrorIntoUserVisibleError converts internal retriable