GithubHelp home page GithubHelp logo

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 about nuraft HOT 5 CLOSED

ebay avatar ebay commented on July 22, 2024
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

from nuraft.

Comments (5)

marising avatar marising commented on July 22, 2024

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.

from nuraft.

greensky00 avatar greensky00 commented on July 22, 2024

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.

from nuraft.

marising avatar marising commented on July 22, 2024

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.

from nuraft.

nicelulu avatar nicelulu commented on July 22, 2024

@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?

from nuraft.

greensky00 avatar greensky00 commented on July 22, 2024

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

from nuraft.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.