Skip to content

Commit 7cda39f

Browse files
authored
chore: change default retry policies timeouts (#53)
1 parent 4dbf692 commit 7cda39f

40 files changed

+683
-317
lines changed

packages/google-cloud-bigquery-storage/docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
# -- General configuration ------------------------------------------------
3030

3131
# If your documentation needs a minimal Sphinx version, state it here.
32-
needs_sphinx = "1.6.3"
32+
needs_sphinx = "1.5.5"
3333

3434
# Add any Sphinx extension module names here, as strings. They can be
3535
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom

packages/google-cloud-bigquery-storage/google/cloud/bigquery_storage_v1/gapic/big_query_read_client.py

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,9 @@ def create_read_session(
273273
>>> response = client.create_read_session(parent, read_session)
274274
275275
Args:
276-
parent (str): Required. The request project that owns the session, in the form of
277-
``projects/{project_id}``.
276+
parent (str): The resource has one pattern, but the API owner expects to add more
277+
later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents
278+
that from being necessary once there are multiple patterns.)
278279
read_session (Union[dict, ~google.cloud.bigquery_storage_v1.types.ReadSession]): Required. Session to be created.
279280
280281
If a dict is provided, it must be of the same form as the protobuf
@@ -427,18 +428,13 @@ def split_read_stream(
427428
metadata=None,
428429
):
429430
"""
430-
Splits a given ``ReadStream`` into two ``ReadStream`` objects. These
431-
``ReadStream`` objects are referred to as the primary and the residual
432-
streams of the split. The original ``ReadStream`` can still be read from
433-
in the same manner as before. Both of the returned ``ReadStream``
434-
objects can also be read from, and the rows returned by both child
435-
streams will be the same as the rows read from the original stream.
436-
437-
Moreover, the two child streams will be allocated back-to-back in the
438-
original ``ReadStream``. Concretely, it is guaranteed that for streams
439-
original, primary, and residual, that original[0-j] = primary[0-j] and
440-
original[j-n] = residual[0-m] once the streams have been read to
441-
completion.
431+
An indicator of the behavior of a given field (for example, that a
432+
field is required in requests, or given as output but ignored as input).
433+
This **does not** change the behavior in protocol buffers itself; it
434+
only denotes the behavior and may affect how API tooling handles the
435+
field.
436+
437+
Note: This enum **may** receive new values in the future.
442438
443439
Example:
444440
>>> from google.cloud import bigquery_storage_v1

packages/google-cloud-bigquery-storage/google/cloud/bigquery_storage_v1/gapic/big_query_read_client_config.py

Lines changed: 30 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,54 +2,64 @@
22
"interfaces": {
33
"google.cloud.bigquery.storage.v1.BigQueryRead": {
44
"retry_codes": {
5-
"idempotent": ["DEADLINE_EXCEEDED", "UNAVAILABLE"],
6-
"unary_streaming": ["UNAVAILABLE"],
7-
"non_idempotent": [],
5+
"retry_policy_1_codes": ["DEADLINE_EXCEEDED", "UNAVAILABLE"],
6+
"no_retry_codes": [],
7+
"retry_policy_3_codes": ["DEADLINE_EXCEEDED", "UNAVAILABLE"],
8+
"retry_policy_2_codes": ["UNAVAILABLE"],
89
},
910
"retry_params": {
10-
"default": {
11+
"retry_policy_1_params": {
1112
"initial_retry_delay_millis": 100,
1213
"retry_delay_multiplier": 1.3,
1314
"max_retry_delay_millis": 60000,
14-
"initial_rpc_timeout_millis": 20000,
15+
"initial_rpc_timeout_millis": 600000,
1516
"rpc_timeout_multiplier": 1.0,
16-
"max_rpc_timeout_millis": 20000,
17+
"max_rpc_timeout_millis": 600000,
1718
"total_timeout_millis": 600000,
1819
},
19-
"create_read_session": {
20+
"retry_policy_2_params": {
2021
"initial_retry_delay_millis": 100,
2122
"retry_delay_multiplier": 1.3,
2223
"max_retry_delay_millis": 60000,
23-
"initial_rpc_timeout_millis": 120000,
24+
"initial_rpc_timeout_millis": 86400000,
2425
"rpc_timeout_multiplier": 1.0,
25-
"max_rpc_timeout_millis": 120000,
26-
"total_timeout_millis": 600000,
26+
"max_rpc_timeout_millis": 86400000,
27+
"total_timeout_millis": 86400000,
2728
},
28-
"read_rows": {
29+
"retry_policy_3_params": {
2930
"initial_retry_delay_millis": 100,
3031
"retry_delay_multiplier": 1.3,
3132
"max_retry_delay_millis": 60000,
32-
"initial_rpc_timeout_millis": 86400000,
33+
"initial_rpc_timeout_millis": 600000,
3334
"rpc_timeout_multiplier": 1.0,
34-
"max_rpc_timeout_millis": 86400000,
35-
"total_timeout_millis": 86400000,
35+
"max_rpc_timeout_millis": 600000,
36+
"total_timeout_millis": 600000,
37+
},
38+
"no_retry_params": {
39+
"initial_retry_delay_millis": 0,
40+
"retry_delay_multiplier": 0.0,
41+
"max_retry_delay_millis": 0,
42+
"initial_rpc_timeout_millis": 0,
43+
"rpc_timeout_multiplier": 1.0,
44+
"max_rpc_timeout_millis": 0,
45+
"total_timeout_millis": 0,
3646
},
3747
},
3848
"methods": {
3949
"CreateReadSession": {
4050
"timeout_millis": 120000,
41-
"retry_codes_name": "idempotent",
42-
"retry_params_name": "create_read_session",
51+
"retry_codes_name": "retry_policy_1_codes",
52+
"retry_params_name": "retry_policy_1_params",
4353
},
4454
"ReadRows": {
4555
"timeout_millis": 21600000,
46-
"retry_codes_name": "unary_streaming",
47-
"retry_params_name": "read_rows",
56+
"retry_codes_name": "retry_policy_2_codes",
57+
"retry_params_name": "retry_policy_2_params",
4858
},
4959
"SplitReadStream": {
5060
"timeout_millis": 120000,
51-
"retry_codes_name": "idempotent",
52-
"retry_params_name": "default",
61+
"retry_codes_name": "retry_policy_3_codes",
62+
"retry_params_name": "retry_policy_3_params",
5363
},
5464
},
5565
}

packages/google-cloud-bigquery-storage/google/cloud/bigquery_storage_v1/gapic/transports/big_query_read_grpc_transport.py

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -168,18 +168,13 @@ def read_rows(self):
168168
def split_read_stream(self):
169169
"""Return the gRPC stub for :meth:`BigQueryReadClient.split_read_stream`.
170170
171-
Splits a given ``ReadStream`` into two ``ReadStream`` objects. These
172-
``ReadStream`` objects are referred to as the primary and the residual
173-
streams of the split. The original ``ReadStream`` can still be read from
174-
in the same manner as before. Both of the returned ``ReadStream``
175-
objects can also be read from, and the rows returned by both child
176-
streams will be the same as the rows read from the original stream.
177-
178-
Moreover, the two child streams will be allocated back-to-back in the
179-
original ``ReadStream``. Concretely, it is guaranteed that for streams
180-
original, primary, and residual, that original[0-j] = primary[0-j] and
181-
original[j-n] = residual[0-m] once the streams have been read to
182-
completion.
171+
An indicator of the behavior of a given field (for example, that a
172+
field is required in requests, or given as output but ignored as input).
173+
This **does not** change the behavior in protocol buffers itself; it
174+
only denotes the behavior and may affect how API tooling handles the
175+
field.
176+
177+
Note: This enum **may** receive new values in the future.
183178
184179
Returns:
185180
Callable: A callable which accepts the appropriate

packages/google-cloud-bigquery-storage/google/cloud/bigquery_storage_v1/proto/arrow_pb2.py

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2+
"""Client and server classes corresponding to protobuf-defined services."""
23
import grpc

packages/google-cloud-bigquery-storage/google/cloud/bigquery_storage_v1/proto/avro_pb2.py

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2+
"""Client and server classes corresponding to protobuf-defined services."""
23
import grpc

packages/google-cloud-bigquery-storage/google/cloud/bigquery_storage_v1/proto/storage_pb2.py

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)