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

Leader election takes > 2 mins after a node in a 2 node cluster restarts #2031

Closed
pawanrawal opened this Issue Jan 18, 2018 · 0 comments

Comments

Projects
None yet
2 participants
@pawanrawal
Copy link
Contributor

commented Jan 18, 2018

  1. Start Zero and 2 Dgraph servers
dgraph zero -o -2000 --replicas 3
dgraph server --memory_mb 2048 -z 127.0.0.1:5080
dgraph server --memory_mb 2048 -o 1 -z 127.0.0.1:5080 -p p2 -w w2
  1. Now kill anyone Dgraph server and restart after 30 seconds.

Both Servers start their own election process which goes on for 2 mins before leader election is successful again.

2018/01/18 15:20:34 raft.go:749: INFO: 1 is starting a new election at term 3
2018/01/18 15:20:34 raft.go:580: INFO: 1 became candidate at term 4
2018/01/18 15:20:34 raft.go:664: INFO: 1 received MsgVoteResp from 1 at term 4
2018/01/18 15:20:34 raft.go:651: INFO: 1 [logterm: 2, index: 4] sent MsgVote request to 2 at term 4
2018/01/18 15:20:37 raft.go:749: INFO: 1 is starting a new election at term 4
2018/01/18 15:20:37 raft.go:580: INFO: 1 became candidate at term 5
2018/01/18 15:20:37 raft.go:664: INFO: 1 received MsgVoteResp from 1 at term 5
2018/01/18 15:20:37 raft.go:651: INFO: 1 [logterm: 2, index: 4] sent MsgVote request to 2 at term 5
2018/01/18 15:20:40 raft.go:749: INFO: 1 is starting a new election at term 5
2018/01/18 15:20:40 raft.go:580: INFO: 1 became candidate at term 6
2018/01/18 15:20:40 raft.go:664: INFO: 1 received MsgVoteResp from 1 at term 6
2018/01/18 15:20:40 raft.go:651: INFO: 1 [logterm: 2, index: 4] sent MsgVote request to 2 at term 6
2018/01/18 15:20:43 raft.go:749: INFO: 1 is starting a new election at term 6
2018/01/18 15:20:43 raft.go:580: INFO: 1 became candidate at term 7

Logs on the other server are also similar. A build which demonstrates the issue https://travis-ci.org/dgraph-io/dgraph/builds/330171114

@pawanrawal pawanrawal added the bug label Jan 18, 2018

@pawanrawal pawanrawal added this to the v1.x milestone Jan 18, 2018

@pawanrawal pawanrawal changed the title Leader election takes > 2 mins after a node in a 2 node cluster is brought up Leader election takes > 2 mins after a node in a 2 node cluster restarts Jan 18, 2018

@manishrjain manishrjain added the bug label Mar 22, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.