Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions operator/pkg/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,7 @@ func (o *Operator) getBatchFromDataService(ctx context.Context, batchURL string,
for attempt := 0; attempt < maxRetries; attempt++ {
if attempt > 0 {
o.Logger.Infof("Waiting for %s before retrying data fetch (attempt %d of %d)", retryDelay, attempt+1, maxRetries)
select {
case <-time.After(retryDelay):
// Wait before retrying
case <-ctx.Done():
return nil, ctx.Err()
}
time.Sleep(retryDelay)
retryDelay *= 2 // Exponential backoff. Ex: 5s, 10s, 20s
}

Expand Down
Loading