Skip to content

Commit

Permalink
fix: Change retry multiplier from 1.3 to 4, for requests that retry R…
Browse files Browse the repository at this point in the history
…esour… (#971)

* fix: Change retry multiplier from 1.3 to 4, for requests that retry ResourceExhausted.
  • Loading branch information
amfisher-404 committed Aug 7, 2023
1 parent 62c595a commit e4364d2
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion google/pubsub_v1/services/publisher/async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ async def sample_publish():
default_retry=retries.Retry(
initial=0.1,
maximum=60.0,
multiplier=1.3,
multiplier=4.0,
predicate=retries.if_exception_type(
core_exceptions.Aborted,
core_exceptions.Cancelled,
Expand Down
2 changes: 1 addition & 1 deletion google/pubsub_v1/services/publisher/transports/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def _prep_wrapped_messages(self, client_info):
default_retry=retries.Retry(
initial=0.1,
maximum=60.0,
multiplier=1.3,
multiplier=4.0,
predicate=retries.if_exception_type(
core_exceptions.Aborted,
core_exceptions.Cancelled,
Expand Down
2 changes: 1 addition & 1 deletion google/pubsub_v1/services/subscriber/async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1383,7 +1383,7 @@ def request_generator():
default_retry=retries.Retry(
initial=0.1,
maximum=60.0,
multiplier=1.3,
multiplier=4.0,
predicate=retries.if_exception_type(
core_exceptions.Aborted,
core_exceptions.DeadlineExceeded,
Expand Down
2 changes: 1 addition & 1 deletion google/pubsub_v1/services/subscriber/transports/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ def _prep_wrapped_messages(self, client_info):
default_retry=retries.Retry(
initial=0.1,
maximum=60.0,
multiplier=1.3,
multiplier=4.0,
predicate=retries.if_exception_type(
core_exceptions.Aborted,
core_exceptions.DeadlineExceeded,
Expand Down

0 comments on commit e4364d2

Please sign in to comment.