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)
| 156 | // TODO(knz): This should really use the errors library. Investigate |
| 157 | // how to get rid of the error message comparison. |
| 158 | func IsSQLRetryableError(err error) bool { |
| 159 | // Don't forget to update the corresponding test when making adjustments |
| 160 | // here. |
| 161 | errString := FullError(err) |
| 162 | matched, merr := regexp.MatchString( |
| 163 | "(no inbound stream connection|connection reset by peer|connection refused|failed to send RPC|rpc error: code = Unavailable|(^|\\s)EOF|result is ambiguous)", |
| 164 | errString) |
| 165 | if merr != nil { |
| 166 | return false |
| 167 | } |
| 168 | return matched |
| 169 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…