googleapis / googleapis/google-cloud-go

bigquery: make it possible to configure Retryer for the regular client

Open
#5,146 3 comments 0 reactions 1 assignee Claimed by @shollyman View on GitHub
api: bigquery type: feature request
Dominant language
Go
Stars
4.5k
Forks
1.6k
Avg merge
1d 13h
Merged PRs (30d)
109

Description

**Is your feature request related to a problem? Please describe.**

Currently it is not possible to configure the Retryer used for the regular client,
used to interact with BigQuery using the legacy InsertAll client. This is not a big deal you would think,
as the defaults used are very acceptable indeed.

However, in #3792 you've indicated that 5xx errors such as the 500 internal sever aren't something
you wish to retry by design. This because it most likely indicates a bug server-side and should be reported.
However within this category also fall some temporary issues for which the message itself says that one should retry.

**Describe the solution you'd like**

Now I do appreciate that the BigQuery client by default doesn't want to handle it. However, it's not alright I think
that we cannot define our own Retryer for those users who do wish to retry on additional kind of errors, such
as for example the 500 internal sever error cases.

A solution could be to add a ClientOption for this, so that a custom retryer could be created if desired.

**Describe alternatives you've considered**

The alternatives are to either live with this and ignore it further, or live with the fact that you wish to not handle it,
and write a wrapper retryer around your Put logic to retry 5xx errors non the less. This feels however pretty crazy,
as that would put us in a situation where we have a Retryer around a retryer.

**Additional context**

N/A

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.