Skip to content

Commit

Permalink
fix(storage): retry broken pipe error (#10374)
Browse files Browse the repository at this point in the history
This is another retryable net.OpError that can arise when a
connection has been closed. So far we've only seen this in
TestRetryConformance cases rather than in customer issues, but
there is no reason not to do a retry and we think it can cut
down on flakes from this test.

I'm going to do another PR to add this to google-api-go-client
since it often occurs on uploads.

Updates #9178
  • Loading branch information
tritone authored Jun 12, 2024
1 parent 134f567 commit 2f4daa1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion storage/invoke.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ func ShouldRetry(err error) bool {
// Retry socket-level errors ECONNREFUSED and ECONNRESET (from syscall).
// Unfortunately the error type is unexported, so we resort to string
// matching.
retriable := []string{"connection refused", "connection reset"}
retriable := []string{"connection refused", "connection reset", "broken pipe"}
for _, s := range retriable {
if strings.Contains(e.Error(), s) {
return true
Expand Down

0 comments on commit 2f4daa1

Please sign in to comment.