-
Notifications
You must be signed in to change notification settings - Fork 77
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
[Feature]: Client should retry immediately after receive certain errors #672
Comments
Hello there @bsbds ! I'd like to work on this issue if that's fine by you. Thank you! |
Sure, assigned. |
Hey @bsbds ! I have made the necessary changes to the code. Wanted to ask if there are any more error-codes other than |
From what I see now, there are only these two kinds of errors that do not require retrying. I think the (retriable) errors can be divided into two types, one type indicating that the server is currently unable to process this request, while the other type indicating that the server's current state is okay, and it's the client's own state that is outdated. What do you think? |
Hey @bsbds ! I'm sorry for the delay in this PR, I had my university exams. I have made some changes to the required function but I'm getting
I have made the changes such that the function is basically divided into two parts, one handles client side errors and other handles server side errors. With client side errors, we retry immediately without calling any delay or backoff. But with this comes the danger of infinite loop, hence I introduced a threshold for this as you can see. Can you help me figure where I'm going wrong? I'm sorry for the delay and so many doubts, I'm new to async rust. |
Description about the feature
The current retry logic in the curp client always waits for a period of time after the propose has returned an error. However, this may not be necessary for certain errors like
CurpError::WrongClusterVersion
orCurpError::Redirect
. These errors indicate that the client's local information is outdated, and after fetching the latest infomation from the cluster, the retry could proceed immediately.Xline/crates/curp/src/client/retry.rs
Lines 117 to 183 in 296105f
Code of Conduct
The text was updated successfully, but these errors were encountered: