-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
BigQuery: 'QueryJob.result' raises 500, even with 'retry' passed when creating the job #6301
Comments
@bencaine1 that comment indicates that the caller cannot pass in a As a workaround, you might be able to just replace the from google.api_core.future.polling import _OperationNotComplete
from google.api_core.retry import Retry
from google.cloud import bigquery
from google.cloud.bigquery.retry import DEFAULT_RETRY
from google.cloud.bigquery.retry import _should_retry
def _predicate(exc):
return isinstance(exc, _OperationNotComplete) or _should_retry(exc)
result_retry = Retry(predicate=_predicate)
bigquery.Client(project=project_id)
query_job = client.query(query, job_config=config, retry=DEFAULT_RETRY)
query_job.retry = result_retry
query_job.result() |
Thanks so much for the fix! I'm still confused as to why there are two places where you could specify a retry. What does the retry in client.query() do? |
|
Thanks for the clarification! And thanks for working on the fix :) |
We're starting to get the same flaky 500 errors again. We've implemented the workaround described here as follows:
If it were a timeout, it would have thrown a RetryError, so it's probably not a timeout. Any ideas? |
@bencaine1 Can you show the traceback for the 500 you are seeing now? |
|
I agree that the error is not propagating from the |
OS: Linux dc32b7e8763a 4.9.0-6-amd64 #1 SMP Debian 4.9.82-1+deb9u3 (2018-03-02) x86_64 x86_64 x86_64 GNU/Linux
Python version: Python 2.7.6
google-cloud-bigquery: 1.5.0
My code:
I'm getting stack traces like:
Could it be because PollingFuture doesn't take a Retry object (per this TODO)?
The text was updated successfully, but these errors were encountered: