Skip to content

Commit

Permalink
fix(bigquery): reduce default backoffs (#10558)
Browse files Browse the repository at this point in the history
* fix(bigquery): reduce the initial backoff for job polling

This PR reduces the initial backoff used during job polling from 1s to
50ms.  In practice most time is spent in the hanging poll on the server
side in GetQueryResults, so this reduces opportunities for wasted
waiting.

Fixes: #10555
  • Loading branch information
shollyman authored Jul 17, 2024
1 parent 4e180f4 commit 037e9ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bigquery/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -356,8 +356,8 @@ func (j *Job) waitForQuery(ctx context.Context, projectID string) (Schema, uint6
call = call.FormatOptionsUseInt64Timestamp(true)
setClientHeader(call.Header())
backoff := gax.Backoff{
Initial: 1 * time.Second,
Multiplier: 2,
Initial: 50 * time.Millisecond,
Multiplier: 1.3,
Max: 60 * time.Second,
}
var res *bq.GetQueryResultsResponse
Expand Down

0 comments on commit 037e9ef

Please sign in to comment.