Skip to content
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

In the case of auto_forwarding_= true, an error of "socket is already in use, race happened on connection to " appears for the append_entries of the follower #184

Closed
nicelulu opened this issue Mar 19, 2021 · 5 comments

Comments

@nicelulu
Copy link
Contributor

Hi,
In the case of auto_forwarding_= true, can the append_entries of the follower only forward messages to the leader one by one?

@marising
Copy link

hi @greensky00

I suggest auto_forwarding_=true should be provided, Adding a service in the outer layer of NuRaft to increase the complexity.

Is it possible to add serial and parallel modes in "asio_rpc_client" and "asio_rpc_listener", Serial in operations such as append entry and parallel in foward request to leader.

@greensky00
Copy link
Contributor

Thanks, @nicelulu @marising for suggesting this.

We will consider supporting multiple in-flight messages. But please note that auto-forwarding has endless edge-cases that may cause potential problems, and that's why we don't recommend it (also we don't internally use it). For example, a follower forwards a message to the leader, and the leader succeeds to replicate it, but the response of the "forwarding" is lost. There is no way for this follower to know whether it should retry or not. There are a number of such complicated issues and we will not cover them. It should be handled at your own risk.

@marising
Copy link

Thanks @greensky00 for your reply.
In our system, Exactly-once is not required, only At-least-once is required, which means that the log entry can be repeated but cannot be lost. In addition, we have relatively high performance requirements, In the case of a log of 1KB, append log requires >= 30,000 TPS, so support multi-threaded auto-forward is very important for us, and we look forward to it.

@nicelulu
Copy link
Contributor Author

@greensky00 Thank you for solving this problem. I met some error logs during the test : session 1 failed to read rpc header from socket ::ffff:172.18.0.2:53410 due to error 2. What could be the reason for this?

@greensky00
Copy link
Contributor

Hi @nicelulu
error 2 means the destination endpoint is unavailable (disconnected). It is not a critical one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants