Skip to content

Commit

Permalink
ErrQueryInterrupted with parameters (tikv#1124)
Browse files Browse the repository at this point in the history
* feat: ErrQueryInterrupted with parameters

Signed-off-by: ekexium <eke@fastmail.com>

* Revert "Revert "fix: check kill signal against 0 (tikv#1102)" (tikv#1129)"

This reverts commit 3480b5e.

Signed-off-by: ekexium <eke@fastmail.com>

---------

Signed-off-by: ekexium <eke@fastmail.com>
Co-authored-by: cfzjywxk <lsswxrxr@163.com>
  • Loading branch information
ekexium and cfzjywxk committed Feb 27, 2024
1 parent dffcaa5 commit b2e5bf8
Show file tree
Hide file tree
Showing 4 changed files with 432 additions and 4 deletions.
13 changes: 11 additions & 2 deletions error/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ var (
// ErrTiFlashServerTimeout is the error when tiflash server is timeout.
ErrTiFlashServerTimeout = errors.New("tiflash server timeout")
// ErrQueryInterrupted is the error when the query is interrupted.
ErrQueryInterrupted = errors.New("query interruppted")
// This is deprecated. Keep it only to pass CI :-(. We can remove this later.
ErrQueryInterrupted = errors.New("query interrupted")
// ErrTiKVStaleCommand is the error that the command is stale in tikv.
ErrTiKVStaleCommand = errors.New("tikv stale command")
// ErrTiKVMaxTimestampNotSynced is the error that tikv's max timestamp is not synced.
Expand Down Expand Up @@ -96,11 +97,19 @@ var (
// ErrIsWitness is the error when a request is send to a witness.
ErrIsWitness = errors.New("peer is witness")
// ErrUnknown is the unknow error.
ErrUnknown = errors.New("unknow")
ErrUnknown = errors.New("unknown")
// ErrResultUndetermined is the error when execution result is unknown.
ErrResultUndetermined = errors.New("execution result undetermined")
)

type ErrQueryInterruptedWithSignal struct {
Signal uint32
}

func (e ErrQueryInterruptedWithSignal) Error() string {
return fmt.Sprintf("query interrupted by signal %d", e.Signal)
}

// MismatchClusterID represents the message that the cluster ID of the PD client does not match the PD.
const MismatchClusterID = "mismatch cluster id"

Expand Down
Loading

0 comments on commit b2e5bf8

Please sign in to comment.