Skip to content

Commit ab9a961

Browse files
authored
fix(bigquery): remove retry on FailedPrecondition (#10671)
1 parent 0f25bf2 commit ab9a961

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

β€Žbigquery/storage_iterator.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,6 @@ func retryReadRows(bo gax.Backoff, err error) (time.Duration, bool) {
289289
case codes.Aborted,
290290
codes.Canceled,
291291
codes.DeadlineExceeded,
292-
codes.FailedPrecondition,
293292
codes.Internal,
294293
codes.Unavailable:
295294
return bo.Pause(), true

β€Žbigquery/storage_iterator_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,17 @@ func TestStorageIteratorRetry(t *testing.T) {
4949
status.Errorf(codes.Unavailable, "try 2"),
5050
status.Errorf(codes.Canceled, "try 3"),
5151
status.Errorf(codes.Internal, "try 4"),
52+
status.Errorf(codes.Aborted, "try 5"),
5253
},
5354
wantFail: false,
5455
},
56+
{
57+
desc: "expired session",
58+
errors: []error{
59+
status.Errorf(codes.FailedPrecondition, "read session expired"),
60+
},
61+
wantFail: true,
62+
},
5563
{
5664
desc: "not enough permission",
5765
errors: []error{

0 commit comments

Comments
 (0)