Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(bigquery): add special http2 case to retry predicate #3129

Merged
merged 3 commits into from
Nov 3, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions bigquery/bigquery.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,14 @@ func runWithRetry(ctx context.Context, call func() error) error {
// retryable; these are returned by systems between the client and the BigQuery
// service.
func retryableError(err error) bool {
// Special case due to http2: https://github.com/googleapis/google-cloud-go/issues/1793
// Due to Go's default being higher for streams-per-connection than is accepted by the
// BQ backend, it's possible to get streams refused immediately after a connection is
// started but before we receive SETTINGS frame from the backend. This generally only
// happens when we try to enqueue > 100 requests onto a newly initiated connection.
if err.Error() == "http2: stream closed" {
return true
}
e, ok := err.(*googleapi.Error)
if !ok {
return false
Expand Down