Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pkg: add a new retry to support the error isRetryable or not #1848
pkg: add a new retry to support the error isRetryable or not #1848
Changes from 15 commits
a510306
6bc3b26
71bcadf
6de529f
cdb364c
af540c0
e52b7f8
ad4d079
4c96108
58c28d2
1de9992
4e1a48e
d4c318e
569f9a7
a599219
89c5809
78f099e
e81ab15
9dbf3a8
8d98e7e
064f8ef
7e15881
8d24ba9
6493364
b5a0c36
13dea49
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what happens when
backoffCapInMs
is larger thanbackoffBaseInMs
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think what u mean is
backoffCapInMs < backoffBaseInMs
,temp := int64(math.Min(backoffCapInMs, backoffBaseInMs*math.Exp2(try)) / 2))
will always use
backoffCapInMs
to calculate, kind like after try for 100 times, always returnbackoffCapInMs
formath.Min(backoffCapInMs, backoffBaseInMs*math.Exp2(try)) / 2)