Skip to content

Commit

Permalink
Merge pull request #58 from livepeer/emran/fix-retry
Browse files Browse the repository at this point in the history
uploader: update exponential backoff timeouts
  • Loading branch information
emranemran authored Jun 12, 2024
2 parents 226ba72 + 2d1f9f6 commit e79620c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/uploader.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ func (bc *ByteCounter) Write(p []byte) (n int, err error) {

func newExponentialBackOffExecutor() *backoff.ExponentialBackOff {
backOff := backoff.NewExponentialBackOff()
backOff.InitialInterval = 10 * time.Second
backOff.MaxInterval = 1 * time.Minute
backOff.InitialInterval = 30 * time.Second
backOff.MaxInterval = 2 * time.Minute
backOff.MaxElapsedTime = 0 // don't impose a timeout as part of the retries

return backOff
}

func UploadRetryBackoff() backoff.BackOff {
return backoff.WithMaxRetries(newExponentialBackOffExecutor(), 7)
return backoff.WithMaxRetries(newExponentialBackOffExecutor(), 4)
}

const segmentWriteTimeout = 5 * time.Minute
Expand Down

0 comments on commit e79620c

Please sign in to comment.