Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sql: report internal distsql communication error as an internal error #14770

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/sql/distsqlrun/inbound.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func processInboundStreamHelper(
if err != nil {
if err != io.EOF {
// Communication error.
err = pgerror.NewErrorf(pgerror.CodeConnectionFailureError, "communication error: %s", err)
err = pgerror.NewErrorf(pgerror.CodeInternalError, "communication error: %s", err)
sendErrToConsumer(err)
errChan <- err
return
Expand Down
6 changes: 3 additions & 3 deletions pkg/sql/schema_changer.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,14 +187,14 @@ func isPermanentSchemaChangeError(err error) bool {
return false
case *pgerror.Error:
switch err.Code {
case pgerror.CodeSerializationFailureError, pgerror.CodeConnectionFailureError:
case pgerror.CodeSerializationFailureError:
return false

case pgerror.CodeInternalError:
if err.Message == context.DeadlineExceeded.Error() {
if err.Message == context.DeadlineExceeded.Error() ||
strings.HasPrefix(err.Message, "communication error") {
return false
}

}
}

Expand Down