Skip to content

Commit

Permalink
driver: convert ErrQueryInterrupted to actual error types (#50517) (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-chi-bot authored Feb 28, 2024
1 parent d9c2565 commit f942e74
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions DEPS.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -4179,8 +4179,8 @@ def go_deps():
name = "com_github_tikv_client_go_v2",
build_file_proto_mode = "disable_global",
importpath = "github.com/tikv/client-go/v2",
sum = "h1:MuTNChL77sMvCvtOuGhuU/u1YBaSDPfqnO6roUCKwOA=",
version = "v2.0.8-0.20231211100325-d44bb7f9cb9e",
sum = "h1:7jGKpdA+Amwe8J5XyRI9gjrBNxmqsqE9z/2MBn132x4=",
version = "v2.0.8-0.20240227133143-d5ccdf66f80c",
)
go_repository(
name = "com_github_tikv_pd",
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ require (
github.com/stretchr/testify v1.8.2
github.com/tdakkota/asciicheck v0.2.0
github.com/tiancaiamao/appdash v0.0.0-20181126055449-889f96f722a2
github.com/tikv/client-go/v2 v2.0.8-0.20231211100325-d44bb7f9cb9e
github.com/tikv/client-go/v2 v2.0.8-0.20240227133143-d5ccdf66f80c
github.com/tikv/pd/client v0.0.0-20231211083919-fe6fd1721aa6
github.com/timakin/bodyclose v0.0.0-20221125081123-e39cf3fc478e
github.com/twmb/murmur3 v1.1.6
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -967,8 +967,8 @@ github.com/tiancaiamao/appdash v0.0.0-20181126055449-889f96f722a2 h1:mbAskLJ0oJf
github.com/tiancaiamao/appdash v0.0.0-20181126055449-889f96f722a2/go.mod h1:2PfKggNGDuadAa0LElHrByyrz4JPZ9fFx6Gs7nx7ZZU=
github.com/tiancaiamao/gp v0.0.0-20221230034425-4025bc8a4d4a h1:J/YdBZ46WKpXsxsW93SG+q0F8KI+yFrcIDT4c/RNoc4=
github.com/tiancaiamao/gp v0.0.0-20221230034425-4025bc8a4d4a/go.mod h1:h4xBhSNtOeEosLJ4P7JyKXX7Cabg7AVkWCK5gV2vOrM=
github.com/tikv/client-go/v2 v2.0.8-0.20231211100325-d44bb7f9cb9e h1:MuTNChL77sMvCvtOuGhuU/u1YBaSDPfqnO6roUCKwOA=
github.com/tikv/client-go/v2 v2.0.8-0.20231211100325-d44bb7f9cb9e/go.mod h1:45NuHB8x+VAoztMIjF6hEgXvPQXhXWPfMxDg0N8CoRY=
github.com/tikv/client-go/v2 v2.0.8-0.20240227133143-d5ccdf66f80c h1:7jGKpdA+Amwe8J5XyRI9gjrBNxmqsqE9z/2MBn132x4=
github.com/tikv/client-go/v2 v2.0.8-0.20240227133143-d5ccdf66f80c/go.mod h1:45NuHB8x+VAoztMIjF6hEgXvPQXhXWPfMxDg0N8CoRY=
github.com/tikv/pd/client v0.0.0-20231211083919-fe6fd1721aa6 h1:BBwUZAaBl7DKdyaduOxXqias4xCtdDgIAGsDBuri3lg=
github.com/tikv/pd/client v0.0.0-20231211083919-fe6fd1721aa6/go.mod h1:8XEP9aqUvvc9guWJZ7vo0av0H6QsJtjIrOmLAQlL2Jo=
github.com/timakin/bodyclose v0.0.0-20221125081123-e39cf3fc478e h1:MV6KaVu/hzByHP0UvJ4HcMGE/8a6A4Rggc/0wx2AvJo=
Expand Down
3 changes: 2 additions & 1 deletion store/driver/error/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ func ToTiDBErr(err error) error {
return ErrTiFlashServerTimeout
}

if stderrs.Is(err, tikverr.ErrQueryInterrupted) {
if stderrs.Is(err, tikverr.ErrQueryInterruptedWithSignal{Signal: 1}) {
// TODO: This error is defined here, while others are using exeerrors as in sql killer. Maybe unify them?
return ErrQueryInterrupted
}

Expand Down

0 comments on commit f942e74

Please sign in to comment.