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

feat: Updated BigQueryRetryAlgorithm so that it can retry on RateLimit Errors using RegEx #1499

Merged
merged 5 commits into from Aug 11, 2021

Conversation

prash-mi
Copy link
Contributor

@prash-mi prash-mi commented Aug 11, 2021

Updated BigQueryRetryAlgorithm so that it can retry on error messaged like:

{
  "code" : 400,
  "errors" : [ {
    "domain" : "global",
    "message" : "Job exceeded rate limits: Your table exceeded quota for table update operations. For more information, see https://cloud.google.com/bigquery/docs/troubleshoot-quotas",
    "reason" : "jobRateLimitExceeded"
  } ],
  "message" : "Job exceeded rate limits: Your table exceeded quota for table update operations. For more information, see https://cloud.google.com/bigquery/docs/troubleshoot-quotas",
  "status" : "INVALID_ARGUMENT"
}

The BigQueryRetryAlgorithm.shouldRetryBasedOnBigQueryRetryConfig logic will work as follows:

  1. Apply a case insensitive contains check on the error message to check if it should be retied
  2. If the contains check fails then it will apply a RegEx pattern to determine if the error message can be retried.

Fixes #1498 ☕️

@prash-mi prash-mi requested a review from as a code owner Aug 11, 2021
@prash-mi prash-mi requested a review from loferris Aug 11, 2021
@product-auto-label product-auto-label bot added the api: bigquery label Aug 11, 2021
@google-cla google-cla bot added the cla: yes label Aug 11, 2021
@stephaniewang526 stephaniewang526 merged commit ec68c11 into googleapis:master Aug 11, 2021
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery cla: yes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants