Skip to content
This repository was archived by the owner on Sep 26, 2023. It is now read-only.

Conversation

@igorbernstein2
Copy link
Contributor

No description provided.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Feb 14, 2019
@codecov
Copy link

codecov bot commented Feb 14, 2019

Codecov Report

Merging #668 into master will increase coverage by <.01%.
The diff coverage is 66.66%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #668      +/-   ##
============================================
+ Coverage     75.94%   75.94%   +<.01%     
- Complexity     1014     1017       +3     
============================================
  Files           190      190              
  Lines          4452     4453       +1     
  Branches        346      346              
============================================
+ Hits           3381     3382       +1     
  Misses          915      915              
  Partials        156      156
Impacted Files Coverage Δ Complexity Δ
...rc/main/java/com/google/api/gax/rpc/Callables.java 68.88% <66.66%> (+0.7%) 10 <5> (+3) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update eeea903...a11d70d. Read the comment docs.

// RetryingCallable affects the rpc deadline of the initial attempt and the number of retries.
// If the rpc timeout is disabled and no further attempts can be made, then the retry
// infrastructure can be removed.
return retrySettings.getInitialRpcTimeout().isZero()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

retrySettings.getInitialRpcTimeout().isZero() in && is suspicious. I have two questions:

  1. What does initialRpcTimeout == 0 means from sever side point of view (does it mean "no timeout", call takes as much time as it needs?)
  2. Aren't retrySettings.maxAttempts() == 1 and retryableCodes.isEmtpy() themselves are enough to disable retries (why is initialRpcTimeout relevant here)? I.e. why not just the following:
return retrySettings.getMaxAttempts() == 1 || retryableCodes.isEmpty();

Otherwise, if retrySettings.getInitialRpcTimeout().isZero() == false, but retrySettings.getMaxAttempts() == 1 || retryableCodes.isEmpty() == true, the whole expression gives false. Then, if something fails, the process goes into retrying infrastructure, but it immediately determines it as non-retriabel (one attempt is made, and one is already the maximum) and terminates.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. initialRpcTimeout doesn't have a meaning on the serverside. However, gax treats 0 as unset:
    https://github.com/googleapis/gax-java/blob/master/gax/src/main/java/com/google/api/gax/rpc/AttemptCallable.java#L72-L75

  2. Ok I'll remove it

@igorbernstein2
Copy link
Contributor Author

updated, ptal

Copy link
Contributor

@vam-google vam-google left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@igorbernstein2 igorbernstein2 merged commit e8d798c into googleapis:master Feb 14, 2019
This was referenced Feb 20, 2019
This was referenced Feb 28, 2019
@igorbernstein2 igorbernstein2 deleted the fix-retry-removal branch November 19, 2021 18:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants