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

errno, store: fix ErrPDServerTimeout arguments #40468

Merged
merged 4 commits into from
Jan 11, 2023
Merged
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 errno/errname.go
Original file line number Diff line number Diff line change
Expand Up @@ -1102,7 +1102,7 @@ var MySQLErrName = map[uint16]*mysql.ErrMessage{

ErrColumnInChange: mysql.Message("column %s id %d does not exist, this column may have been updated by other DDL ran in parallel", nil),
// TiKV/PD errors.
ErrPDServerTimeout: mysql.Message("PD server timeout", nil),
ErrPDServerTimeout: mysql.Message("PD server timeout: %s", nil),
ErrTiKVServerTimeout: mysql.Message("TiKV server timeout", nil),
ErrTiKVServerBusy: mysql.Message("TiKV server is busy", nil),
ErrTiFlashServerTimeout: mysql.Message("TiFlash server timeout", nil),
Expand Down
2 changes: 1 addition & 1 deletion errors.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2698,7 +2698,7 @@ TTL manager has timed out, pessimistic locks may expire, please commit or rollba

["tikv:9001"]
error = '''
PD server timeout
PD server timeout: %s
'''

["tikv:9002"]
Expand Down
3 changes: 0 additions & 3 deletions store/driver/error/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,6 @@ func ToTiDBErr(err error) error {

var pdServerTimeout *tikverr.ErrPDServerTimeout
if stderrs.As(err, &pdServerTimeout) {
if len(pdServerTimeout.Error()) == 0 {
return ErrPDServerTimeout
}
return ErrPDServerTimeout.GenWithStackByArgs(pdServerTimeout.Error())
}

Expand Down