Skip to content
This repository was archived by the owner on Dec 19, 2017. It is now read-only.

New leader triggers onLeave event #306

@benji

Description

@benji

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions