Skip to content

Commit

Permalink
Reduce the max retry interval from 1 min to 20 secs.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 662978128
Change-Id: I6647ef16f426b9031efe4623dee219f33cab231a
  • Loading branch information
Sax Authors authored and copybara-github committed Aug 14, 2024
1 parent 5ab11c3 commit fb07395
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions saxml/common/retrier.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ func (q queryRetrier) Do(ctx context.Context, query Closure, retriable IsRetriab
opts := backoff.NewExponentialBackOff()
// Fast initial retries.
opts.InitialInterval = 10 * time.Millisecond
// Max retry interval.
opts.MaxInterval = 20 * time.Second
// Because the retry loop still respects ctx's deadline, we want
// the loop retries as many times as necessary.
opts.MaxElapsedTime = 0
Expand Down

0 comments on commit fb07395

Please sign in to comment.