Skip to content

Commit

Permalink
br: output backup error from TiKV (pingcap#58671)
Browse files Browse the repository at this point in the history
  • Loading branch information
Leavrth authored Jan 16, 2025
1 parent c9215ec commit d5dab77
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions br/pkg/backup/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -1222,14 +1222,12 @@ func (bc *Client) OnBackupResponse(
res := utils.HandleBackupError(errPb, storeID, errContext)
switch res.Strategy {
case utils.StrategyGiveUp:
errMsg := res.Reason
if len(errMsg) <= 0 {
errMsg = errPb.Msg
}
logutil.CL(ctx).Error("TiKV encountered an error, interrupting the backup.", zap.String("error message", errPb.Msg))
// TODO output a precise store address. @3pointer
return nil, errors.Annotatef(berrors.ErrKVStorage, "error happen in store %v: %s",
return nil, errors.Annotatef(berrors.ErrKVStorage, "error happen in store %v: %s, %s",
storeID,
errMsg,
res.Reason,
errPb.Msg,
)
}
}
Expand Down

0 comments on commit d5dab77

Please sign in to comment.