Skip to content

Commit 037e9ef

Browse files
authored
fix(bigquery): reduce default backoffs (#10558)
* 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
1 parent 4e180f4 commit 037e9ef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bigquery/job.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -356,8 +356,8 @@ func (j *Job) waitForQuery(ctx context.Context, projectID string) (Schema, uint6
356356
call = call.FormatOptionsUseInt64Timestamp(true)
357357
setClientHeader(call.Header())
358358
backoff := gax.Backoff{
359-
Initial: 1 * time.Second,
360-
Multiplier: 2,
359+
Initial: 50 * time.Millisecond,
360+
Multiplier: 1.3,
361361
Max: 60 * time.Second,
362362
}
363363
var res *bq.GetQueryResultsResponse

0 commit comments

Comments
 (0)