-
Notifications
You must be signed in to change notification settings - Fork 241
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
RPC should set connection timeout. #411
Comments
There is already a timeout logic that calls Lines 1028 to 1040 in 728644d
|
As my understanding the timer here is set to wait other thread connect and send data and when time is up it will retry send. And I find socket connect has no timout: Lines 1231 to 1248 in 728644d
I am not familar with NuRaft RPC and please correct me if I am wrong. |
Ok got it, the existing timeout logic does not work for auto forwarding as there is no retry for auto forwarding. Need more time to think about it in detail, to unify it with existing timeout logic. Thanks. |
In my project thread was stuck by NuRaft auto forwarding RPC connect method.
How to reproduce?
1.Thread node n1, n2, n3 and let's assume that n3 is leader.
2.Make network partition separating n3 with n1, n2 by iptables.
3. wait new leader
4. send request to n1
PS: you can increase OS option
net.ipv4.tcp_syn_retries
to increase system max connect timeout.details see JDRaftKeeper/RaftKeeper#42
Solution
I think we should add connection timeout.
The text was updated successfully, but these errors were encountered: