Google-cloud-go: bigquery: job.Read does not return error and runs forever if error reason is "rateLimitExceeded"

Created on 4 Oct 2018  路  6Comments  路  Source: googleapis/google-cloud-go

Client

BigQuery

Describe Your Environment

code example

...
queryCtx, _ := context.WithTimeout(ctx, 5*time.Minute) 
job, err := q.Run(queryCtx) 
if err != nil { 
 // handle error
} 
it, err := job.Read(queryCtx) 
if err != nil { 
  // 
} 
...

Expected Behavior

Running the above code sample and job fails with error reason: rateLimitExceeded
should either

  • Retry the job
    or
  • Fail

Actual Behavior

Running a job with query.Run(ctx) is successful (does not return error) ,but the underlying job is failing with Exceeded rate limits: too many concurrent queries for this project,
running job.Read() is executing : https://github.com/GoogleCloudPlatform/google-cloud-go/blob/7b18bf67abfec72beb23fc10741b46f6f9d61a9f/bigquery/job.go#L312

Since rateLimitExceeded is considered retrayable error, it is executing :
https://github.com/GoogleCloudPlatform/google-cloud-go/blob/master/bigquery/job.go#L310

but the above code does not retry the job, and only executes GetQueryResults which already failed with rateLimitExceeded.

this will retry forever (or in the above example, context deadline will expire after 5 minutes time)

bigquery p2 bug

Most helpful comment

Backend fix has now been completely rolled out.

All 6 comments

Status update: after some discussion, a fix for this is in progress in the backend. I'll keep this bug open for now and close once the fix is out.

@eranchetz We've got a fix for this, but we're going to be deploying it gradually. If you're interested in being part of the first release of this fix, please shoot me an email at [email protected]. If not, no worries - you should have it soon! :)

@jadekler Thank you very much for the update, expect an email in you inbox soon ;)

We ran into this as well, thanks for looking. any update on the fix?

Hmmm... I would have expected the fix to be rolled out already. Let me ping the backend team.

Backend fix has now been completely rolled out.

Was this page helpful?
0 / 5 - 0 ratings