atomix / copycat

A novel implementation of the Raft consensus algorithm

Home Page:http://atomix.io/copycat

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

New leader triggers onLeave event

benji opened this issue · comments

https://gist.github.com/benji/04caa7a454cd9a63ebad87cf8ba18d38

Followers receive a member leave event for the new leader when the leadership election completes:

/127.0.0.1:5003 joined the cluster
15:34:50.309 [copycat-server-/127.0.0.1:5004-copycat] INFO  i.a.c.server.state.ServerContext - /127.0.0.1:5004 - Transitioning to FOLLOWER
State changed to FOLLOWER
15:34:51.451 [copycat-server-/127.0.0.1:5004-copycat] INFO  i.a.c.server.state.FollowerState - /127.0.0.1:5004 - Polling members [ServerMember[type=ACTIVE, status=AVAILABLE, serverAddress=/127.0.0.1:5003, clientAddress=null]]
15:34:51.622 [copycat-server-/127.0.0.1:5004-copycat] INFO  i.a.c.server.state.ServerContext - /127.0.0.1:5004 - Found leader /127.0.0.1:5003
/127.0.0.1:5003 left the cluster