fix: allows retries when setting maxAttempts without setting TotalTimeout#835
fix: allows retries when setting maxAttempts without setting TotalTimeout#835igorbernstein2 merged 5 commits intogoogleapis:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #835 +/- ##
============================================
- Coverage 78.72% 78.61% -0.11%
+ Complexity 1146 1143 -3
============================================
Files 202 202
Lines 5099 4517 -582
Branches 405 374 -31
============================================
- Hits 4014 3551 -463
+ Misses 912 794 -118
+ Partials 173 172 -1
Continue to review full report at Codecov.
|
gax/src/main/java/com/google/api/gax/retrying/ExponentialRetryAlgorithm.java
Outdated
Show resolved
Hide resolved
igorbernstein2
left a comment
There was a problem hiding this comment.
LGTM!
@vam-google, can you take a look as well?
gax/src/main/java/com/google/api/gax/retrying/ExponentialRetryAlgorithm.java
Show resolved
Hide resolved
gax/src/main/java/com/google/api/gax/retrying/ExponentialRetryAlgorithm.java
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## master #835 +/- ##
============================================
+ Coverage 78.72% 78.73% +0.01%
- Complexity 1146 1151 +5
============================================
Files 202 202
Lines 5099 5107 +8
Branches 405 407 +2
============================================
+ Hits 4014 4021 +7
- Misses 912 913 +1
Partials 173 173
Continue to review full report at Codecov.
|
I think the underlying issue is that the algorithm assumes that there is always a total timeout, which is why it needs to be updated |
…ry would not attempt any retries if totalTimeout & maxAttempt is 0.
|
@igorbernstein2 @rahulKQL I think if the case when both |
|
@rahulKQL can you update the RetrySettings docs? I think updating this this paragraph from To: |
|
@rahulKQL can you also update the definition of gax-java/gax/src/main/java/com/google/api/gax/rpc/Callables.java Lines 249 to 251 in 8d7aafc |
|
@igorbernstein2 @vam-google Thanks for the review, I have updated this change request accordingly. Could you please have a fresh look! |
Fixes #827