IsSQLRetryableError returns true if err is retryable. This is true for errors that show a connection issue or an issue with the node itself. This can occur when a node is restarting or is unstable in some other way. Note that retryable errors may occur event in cases where the SQL execution ran to c
(err error)
| 180 | // TODO(knz): This should really use the errors library. Investigate |
| 181 | // how to get rid of the error message comparison. |
| 182 | func IsSQLRetryableError(err error) bool { |
| 183 | // Don't forget to update the corresponding test when making adjustments |
| 184 | // here. |
| 185 | errString := FullError(err) |
| 186 | matched, merr := regexp.MatchString( |
| 187 | "(no inbound stream connection|connection reset by peer|connection refused|failed to send RPC|rpc error: code = Unavailable|EOF|result is ambiguous)", |
| 188 | errString) |
| 189 | if merr != nil { |
| 190 | return false |
| 191 | } |
| 192 | return matched |
| 193 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…