Skip to content

sql,pgerror: improve IsSQLRetryableError and IsDistSQLRetryable #82847

Open
@ajwerner

Description

@ajwerner

Describe the problem

The string error matching is brittle. The goals are good. Retrying when an error might be permanent no longer hurts in the way it once did: jobs use exponential backoff and record a log of failures. The user can cancel a job if the system makes the wrong decision systematically.

matched, merr := regexp.MatchString(
"(no inbound stream connection|connection reset by peer|connection refused|failed to send RPC|rpc error: code = Unavailable|EOF|result is ambiguous)",
errString)

Jira issue: CRDB-16692

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-error-handlingError messages, error propagations/annotationsA-sql-pgwirepgwire protocol issues.C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.T-sql-foundationsSQL Foundations Team (formerly SQL Schema + SQL Sessions)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions