Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
28 changes: 0 additions & 28 deletions go/Godeps/LICENSES

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion go/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ require (
github.com/gocraft/dbr/v2 v2.7.2
github.com/golang/snappy v0.0.4
github.com/google/uuid v1.6.0
github.com/jpillora/backoff v1.0.0
github.com/juju/gnuflag v0.0.0-20171113085948-2ce1bb71843d
github.com/mattn/go-isatty v0.0.17
github.com/mattn/go-runewidth v0.0.13
Expand Down
1 change: 0 additions & 1 deletion go/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,6 @@ github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfC
github.com/jmoiron/sqlx v1.3.4 h1:wv+0IJZfL5z0uZoUjlpKgHkgaFSYD+r9CfrXjEXsO7w=
github.com/jmoiron/sqlx v1.3.4/go.mod h1:2BljVx/86SuTyjE+aPYlHCTNvZrnJXghYGpNiXLBMCQ=
github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo=
github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA=
github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4=
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
Expand Down
16 changes: 8 additions & 8 deletions go/store/nbs/s3_object_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import (

"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/service/s3"
"github.com/jpillora/backoff"
"github.com/cenkalti/backoff/v4"
"golang.org/x/sync/errgroup"
)

Expand Down Expand Up @@ -144,14 +144,14 @@ func (s3or *s3ObjectReader) readRange(ctx context.Context, name string, p []byte
// We hit the point of diminishing returns investigating #3255, so add retries. In conversations with AWS people, it's not surprising to get transient failures when talking to S3, though SDKs are intended to have their own retrying. The issue may be that, in Go, making the S3 request and reading the data are separate operations, and the SDK kind of can't do its own retrying to handle failures in the latter.
if isConnReset(err) {
// We are backing off here because its possible and likely that the rate of requests to S3 is the underlying issue.
b := &backoff.Backoff{
Min: 128 * time.Microsecond,
Max: 1024 * time.Millisecond,
Factor: 2,
Jitter: true,
}
b := backoff.NewExponentialBackOff()
b.InitialInterval = 128 * time.Millisecond
b.MaxInterval = 1024 * time.Millisecond
b.Multiplier = 2
b.Reset()

for ; isConnReset(err); n, sz, err = read() {
dur := b.Duration()
dur := b.NextBackOff()
time.Sleep(dur)
}
}
Expand Down