Skip to content

Commit

Permalink
br: extend the timeout for scan region since 3 seconds is not enough (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
fengou1 committed Dec 23, 2021
1 parent d2ed2ae commit 693946b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions br/pkg/restore/split.go
Original file line number Diff line number Diff line change
Expand Up @@ -455,14 +455,14 @@ type scanRegionBackoffer struct {

func newScanRegionBackoffer() utils.Backoffer {
return &scanRegionBackoffer{
attempt: 3,
attempt: 30,
}
}

// NextBackoff returns a duration to wait before retrying again
func (b *scanRegionBackoffer) NextBackoff(err error) time.Duration {
if berrors.ErrPDBatchScanRegion.Equal(err) {
// 500ms * 3 could be enough for splitting remain regions in the hole.
// 500ms * 30 could be enough for splitting remain regions in the hole.
b.attempt--
return 500 * time.Millisecond
}
Expand Down

0 comments on commit 693946b

Please sign in to comment.