Skip to content

Commit

Permalink
Update br/pkg/pdutil/pd.go
Browse files Browse the repository at this point in the history
Co-authored-by: Obliviate <[email protected]>
  • Loading branch information
sleepymole and buchuitoudegou committed Jun 24, 2022
1 parent 9a84a31 commit ef65a9f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion br/pkg/pdutil/pd.go
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,7 @@ func (p *PdController) pauseSchedulerByKeyRangeWithTTL(ctx context.Context, star
select {
case <-ticker.C:
if err := p.CreateOrUpdateRegionLabelRule(ctx, rule); err != nil {
if err := errors.Cause(err); err == context.Canceled || err == context.DeadlineExceeded {
if err := errors.Cause(err); IsContextCanceled(err) {
break loop
}
log.Warn("pause scheduler by key range failed, ignore it and wait next time pause", zap.Error(err))
Expand Down

0 comments on commit ef65a9f

Please sign in to comment.