Skip to content
This repository was archived by the owner on Nov 12, 2025. It is now read-only.

Commit 66c09c0

Browse files
fix: add missing read api retry setting on SplitReadStream (#311)
- [ ] Regenerate this pull request now. Committer: @yirutang PiperOrigin-RevId: 398057257 Source-Link: googleapis/googleapis@376e8e9 Source-Link: googleapis/googleapis-gen@32c05ed Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMzJjMDVlZDRlZDg4ZDgzYWQ1Y2FmYzc1NDQwNThhY2M1OGJmNTYyOCJ9
1 parent f4fcc4e commit 66c09c0

2 files changed

Lines changed: 24 additions & 2 deletions

File tree

‎google/cloud/bigquery_storage_v1/services/big_query_read/async_client.py‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,17 @@ async def split_read_stream(
441441
# and friendly error handling.
442442
rpc = gapic_v1.method_async.wrap_method(
443443
self._client._transport.split_read_stream,
444-
default_timeout=None,
444+
default_retry=retries.Retry(
445+
initial=0.1,
446+
maximum=60.0,
447+
multiplier=1.3,
448+
predicate=retries.if_exception_type(
449+
core_exceptions.DeadlineExceeded,
450+
core_exceptions.ServiceUnavailable,
451+
),
452+
deadline=600.0,
453+
),
454+
default_timeout=600.0,
445455
client_info=DEFAULT_CLIENT_INFO,
446456
)
447457

‎google/cloud/bigquery_storage_v1/services/big_query_read/transports/base.py‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,19 @@ def _prep_wrapped_messages(self, client_info):
189189
client_info=client_info,
190190
),
191191
self.split_read_stream: gapic_v1.method.wrap_method(
192-
self.split_read_stream, default_timeout=None, client_info=client_info,
192+
self.split_read_stream,
193+
default_retry=retries.Retry(
194+
initial=0.1,
195+
maximum=60.0,
196+
multiplier=1.3,
197+
predicate=retries.if_exception_type(
198+
core_exceptions.DeadlineExceeded,
199+
core_exceptions.ServiceUnavailable,
200+
),
201+
deadline=600.0,
202+
),
203+
default_timeout=600.0,
204+
client_info=client_info,
193205
),
194206
}
195207

0 commit comments

Comments
 (0)