Skip to content

Commit

Permalink
update comment
Browse files Browse the repository at this point in the history
Signed-off-by: ekexium <eke@fastmail.com>
  • Loading branch information
ekexium committed Jan 29, 2024
1 parent 05d571a commit 871f142
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions pkg/store/driver/error/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,20 +118,19 @@ func ToTiDBErr(err error) error {
return ErrTiFlashServerTimeout
}

// TODO: the definitions of the signals are in executor
if stderrs.Is(err, tikverr.ErrQueryInterruptedWithSignal{Signal: sqlkiller.QueryInterrupted}) {
// TODO: This error is defined here, while others are using exeerrors. Maybe unify them?
// TODO: This error is defined here, while others are using exeerrors as in sql killer. Maybe unify them?
return ErrQueryInterrupted
}
if stderrs.Is(err, tikverr.ErrQueryInterruptedWithSignal{Signal: sqlkiller.MaxExecTimeExceeded}) {
return exeerrors.ErrMaxExecTimeExceeded.GenWithStackByArgs()
}
if stderrs.Is(err, tikverr.ErrQueryInterruptedWithSignal{Signal: sqlkiller.QueryMemoryExceeded}) {
// connection id is unkonwn in client
// connection id is unknown in client, which should be logged or filled by upper layers
return exeerrors.ErrMemoryExceedForQuery.GenWithStackByArgs(-1)
}
if stderrs.Is(err, tikverr.ErrQueryInterruptedWithSignal{Signal: sqlkiller.ServerMemoryExceeded}) {
// connection id is unknown in client
// connection id is unknown in client, which should be logged or filled by upper layers
return exeerrors.ErrMemoryExceedForInstance.GenWithStackByArgs(-1)
}

Expand Down

0 comments on commit 871f142

Please sign in to comment.