Comments (5)
Hi Jordan,
sorry for the delay, just returned from NYC and will be away for the better part of the next 2 weeks, too.
I'll get to this eventually (no pun intended :-))
from jgroups-raft.
:-P no rush was just poking around and noticed it. Thought I'd point it out in case I was reading it right.
from jgroups-raft.
Hi Jordan,
There are two timers, heartbeat timer and election timer. As you mentioned,
the election timer must be reset when every time the election starts, in
order to avoid split vote. But, there is no need to reset the heartbeat
timer.
Thanks,
Cheng
On Fri, Mar 25, 2016 at 2:52 PM, Jordan Halterman [email protected]
wrote:
I may be missing something, so apologies if I'm reading your code wrong
:-)
It appears that when handling a VoteRequest, the heartbeat timer is never
reset upon voting for a candidate.https://github.com/belaban/jgroups-raft/blob/master/src/org/jgroups/protocols/raft/ELECTION.java#L191-L211
Raft specifies that a follower resets its election timeout when it grants
a vote to a candidate. This ensures that a follower doesn't vote for a
candidate and then immediately timeout, transition to candidate itself,
increment its term, vote for itself, and ultimately force a newly elected
leader to step down.—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#45
Best wishes!
Sincerely,
ChengLi,
Ph.D Candidate Student,
Max Planck Institute for Software System,
Campus E 1 4,
D-66123 Saarbruecken,
Germany
from jgroups-raft.
In [1], I completely redesigned the way elections work; an election is now triggered and controlled by the JGroups coordinator. This means that election and heartbeat timers are gone; the coord solicits votes from everyone when an election is required and elects a leader based on majority/last-term/longest-index (if all are equal, then rank-based).
While this eliminates concurrent elections, the election outcome should still be correct.
[1] #20
[1] https://github.com/belaban/jgroups-raft/blob/master/doc/design/Election.txt
from jgroups-raft.
@kuujo @pandaworrior If you have time to look at the code, let me know if you spot something that violates Raft: more than one leader or leader not being the one with the highest term/longest log.
from jgroups-raft.
Related Issues (20)
- Remove AsyncCounter and SyncCounter interfaces HOT 1
- withOption method should create a new instance
- Add membership operations to RaftHandle
- Provide quorum reads for `ReplicatedStateMachine`
- `Client` and `ClientStub` issues during membership operations
- Liveness issue with ELECTION HOT 3
- can't remove leader by method of RaftHandle's removeServer HOT 9
- this.raftHandle.channel().disconnect() and reconnect trigger error "not found in retransmission table" HOT 7
- Questions HOT 2
- Ensure a single leader per term
- Configurable class loader for ReplicatedStateMachine block
- CounterTest.testIgnoreReturnValue test failure HOT 5
- Remove ant and use only maven HOT 2
- Restarting node after membership change
- Leader stepping down with membership change HOT 2
- Fix longest log check during election
- Liveness issue joining during election thread execution
- Concurrency issue leads to nodes voting twice in same term
- Election problem HOT 2
- The election process may elect a leader who has left the group HOT 7
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 jgroups-raft.