Git Product home page Git Product logo

Comments (6)

superfell avatar superfell commented on June 12, 2024

Perhaps the real problem is that replicateTo will continue to send AE requests after its stepped down as leader. [it looks like this doesn't stop until a new leader is elected]

from raft.

superfell avatar superfell commented on June 12, 2024

One possible fix would be to add the stopCh to the select list in replicateTo, this would break the feature where it tries to replicate upto a known index when a peer is removed, however various places read the stopCh and loose this replicate up to index number, so its not clear that it works consistently anyway.

If the replicate to an index on peer removal is needed, then it seems like there probably needs to be 2 stop channels, one for an unconditional stop, and one for stop at this index.

Trying to continue to replicate to Index point X (where X was decided while still leader) but no longer leader seems dangerous.

from raft.

armon avatar armon commented on June 12, 2024

@superfell I think this is a race condition, in that AE may be inflight already when the leader steps down. We do stop replication immediately on step down, but things may already have been inflight.

from raft.

armon avatar armon commented on June 12, 2024

I think allowing a vote for the current leader seems fine, since the node's state is still logically consistent.

from raft.

superfell avatar superfell commented on June 12, 2024

My thinking ended up all over the map on this one, but in the end that was the conclusion i came to as well. [but got distracted by the other issue]. Happy to put together a PR for that.

from raft.

armon avatar armon commented on June 12, 2024

@superfell Sounds good, I'll keep an eye out for the PR.

from raft.

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.