Skip to content

Commit

Permalink
fix(bigquery): remove retry on FailedPrecondition (#10671)
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarowolfx authored Aug 12, 2024
1 parent 0f25bf2 commit ab9a961
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 0 additions & 1 deletion bigquery/storage_iterator.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,6 @@ func retryReadRows(bo gax.Backoff, err error) (time.Duration, bool) {
case codes.Aborted,
codes.Canceled,
codes.DeadlineExceeded,
codes.FailedPrecondition,
codes.Internal,
codes.Unavailable:
return bo.Pause(), true
Expand Down
8 changes: 8 additions & 0 deletions bigquery/storage_iterator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,17 @@ func TestStorageIteratorRetry(t *testing.T) {
status.Errorf(codes.Unavailable, "try 2"),
status.Errorf(codes.Canceled, "try 3"),
status.Errorf(codes.Internal, "try 4"),
status.Errorf(codes.Aborted, "try 5"),
},
wantFail: false,
},
{
desc: "expired session",
errors: []error{
status.Errorf(codes.FailedPrecondition, "read session expired"),
},
wantFail: true,
},
{
desc: "not enough permission",
errors: []error{
Expand Down

0 comments on commit ab9a961

Please sign in to comment.