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
feat: add multiple attempts options to client.post API #5176
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5176 +/- ##
==========================================
- Coverage 84.76% 84.60% -0.16%
==========================================
Files 103 103
Lines 7166 7191 +25
==========================================
+ Hits 6074 6084 +10
- Misses 1092 1107 +15
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
1e128c5
to
7c609d1
Compare
0538997
to
482af0e
Compare
Co-authored-by: AlaeddineAbdessalem <alaeddine-13@live.fr>
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.
This seems like a slightly more sophisticated retry mechanism compared to the one that we currently have between gateway and executors.
There (I believe) we don't use the built-in gRPC mechanism, but we do it manually (I think because we want to be able to switch to a different replica when one of them doesn't respond).
Should we implement this exponential backoff strategy there as well?
Co-authored-by: Johannes Messner <44071807+JohannesMessner@users.noreply.github.com>
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.
Some clarification needed
Co-authored-by: Alex Cureton-Griffiths <alexcg1@users.noreply.github.com>
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.
LGTM 👍
Co-authored-by: AlaeddineAbdessalem <alaeddine-13@live.fr>
📝 Docs are deployed on https://docs-continue-on-error--jina-docs.netlify.app 🎉 |
Goal of this PR is to enable
retry_mechanism
in the client.max_attempts
,initial_backoff
,max_backoff
andbackoff_multiplier
in theclient.post
APIcontinue_on_error
with any kind of ErrorsChanges
Allow to pass
max_attempts
,initial_backoff
,max_backoff
andbackoff_multiplier
to client.post APIThe initial retry attempt will occur at random(0, initialBackoff). In general, the n-th attempt will occur at random(0, min(initialBackoff*backoffMultiplier**(n-1), maxBackoff)).
Document
continue_on_error
behavior.