Comments (6)
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.
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.
@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.
I think allowing a vote for the current leader seems fine, since the node's state is still logically consistent.
from raft.
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.
@superfell Sounds good, I'll keep an eye out for the PR.
from raft.
Related Issues (20)
- Using node heartbeats in business logic HOT 1
- New node not receiving raft.Configuration after leader calls AddVoter HOT 3
- Cluster unable to elect a leader after restarting a follower and stopping the leader while the follower is down HOT 2
- How to costumize the Logger Name HOT 2
- Is there a way to make Snapshotting optional? HOT 2
- Your repo doesn't have documentation!
- Enhancement: persist commit index in LogStore to accelerate recovery HOT 4
- Test failed on latest branch: TestRaft_LeadershipTransferToBehindServer HOT 1
- Why the subsequent nodes not join the cluster HOT 2
- Why after calling RemoveServer for a node does it still continue to heartbeat it? HOT 2
- getting notified on losing follower heartbeat HOT 5
- Push to the notify channel and shutdown sign arriving,it is pick one of two but actually nobody know which one HOT 5
- Panic split-brain in appendEntries call HOT 2
- How to observe on follower connecting to cluster ? HOT 1
- How to bootstrap a raft cluster with a single node? HOT 2
- Use pebbledb as raft logstore & stablestore, restart raft cluster nodes all pebbledb data will be lost? HOT 13
- Ability for peers to denote others/themselves as too laggy to accept requests HOT 8
- Inconsistent Raft Latency on Different Infrastructures HOT 8
- Allow network transfer of snapshot to be cancelled during shutdown
- Leader election times seem too long with max current term HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from raft.