Skip to content

Commit

Permalink
errno, store: fix ErrPDServerTimeout arguments (#40468)
Browse files Browse the repository at this point in the history
close #40439
  • Loading branch information
dveeden committed Jan 11, 2023
1 parent 46d4bf0 commit db53a42
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
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

0 comments on commit db53a42

Please sign in to comment.