-
Notifications
You must be signed in to change notification settings - Fork 0
fix: max retries and ratelimit errors in bigquery #395
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
Open
nishantsharma
wants to merge
7
commits into
main
Choose a base branch
from
fix.max_retries_and_ratelimit_errors
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,334
−139
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…query hangs
Add MaxRetries and MaxRetryDuration configuration options for BigQuery
connections. The timeout is enforced via context.WithTimeout() which
limits total query execution time including BigQuery's internal retries.
This solves the issue where queries could hang indefinitely (3+ hours in CI)
when BigQuery's internal retry logic encountered retryable errors like 503
or network issues.
Configuration example:
{
"maxRetries": 16, // advisory, for documentation
"maxRetryDuration": "10m" // enforced via context timeout
}
🔒 Scanned for secrets using gitleaks 8.28.0
BigQuery returns "too many table update operations" as HTTP 400 + invalidQuery, which the google-cloud-go client does NOT automatically retry. This adds: - Type-safe error detection (errors.As + googleapi.Error fields) - Application-level retry with exponential backoff (1s→32s, 2x multiplier) - Configurable MaxRetries and MaxRetryDuration - Jitter to prevent thundering herd Distinguishes rate limit errors from actual syntax errors by checking both the structured Reason field AND the Message content (unavoidable given BigQuery's API design). 🔒 Scanned for secrets using gitleaks 8.28.0
🔒 Scanned for secrets using gitleaks 8.28.0
🔒 Scanned for secrets using gitleaks 8.28.0
…ogle-cloud-go 🔒 Scanned for secrets using gitleaks 8.28.0
- Updated replace directives to use git tags - cloud.google.com/go => v0.123.0-rudder.2 - cloud.google.com/go/bigquery => v1.69.0-rudder.1 - connector.go passes WithMaxRetries to BQ client 🔒 Scanned for secrets using gitleaks 8.28.0
🔒 Scanned for secrets using gitleaks 8.28.0
nishantsharma
commented
Jan 14, 2026
|
|
||
| // Retry configuration for BigQuery API calls | ||
| // MaxRetries limits the number of retry attempts (default: unlimited if not set) | ||
| MaxRetries *int `json:"maxRetries,omitempty"` |
Author
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Split MaxRetries into MaxRetriesDriver, MaxRetriesWrapper.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
BQ with Profiles often faces rate limit errors and too many table update errors. This is an update to retry in certain conditions.
Linear Ticket
https://linear.app/rudderstack/issue/PRO-5029/parent-fix-bq-issues
Security