Skip to content
This repository has been archived by the owner on Nov 18, 2024. It is now read-only.

group state carries two leader #1014

Open
w41ter opened this issue Aug 22, 2022 · 0 comments
Open

group state carries two leader #1014

w41ter opened this issue Aug 22, 2022 · 0 comments

Comments

@w41ter
Copy link
Contributor

w41ter commented Aug 22, 2022

2022-08-22T11:14:17.355427Z TRACE engula_client::router: update event; group state GroupState { group_id: 100001, leader_id: Some(1000012), replicas: [ReplicaState { replica_id: 1000010, group_id: 100001, term: 3, voted_for: 1000010, role: Leader, node_id: 0 }, ReplicaState { replica_id: 1000011, group_id: 100001, term: 3, voted_for: 1000010, role: Follower, node_id: 1 }, ReplicaState { replica_id: 1000012, group_id: 100001, term: 2, voted_for: 1000012, role: Leader, node_id: 2 }] }       
2022-08-22T11:14:17.393537Z TRACE engula_client::router: update event; group state GroupState { group_id: 100001, leader_id: Some(1000012), replicas: [ReplicaState { replica_id: 1000010, group_id: 100001, term: 3, voted_for: 1000010, role: Leader, node_id: 0 }, ReplicaState { replica_id: 1000011, group_id: 100001, term: 3, voted_for: 1000010, role: Follower, node_id: 1 }, ReplicaState { replica_id: 1000012, group_id: 100001, term: 2, voted_for: 1000012, role: Leader, node_id: 2 }] }
2022-08-22T11:14:17.397597Z TRACE engula_client::router: update event; group state GroupState { group_id: 100001, leader_id: Some(1000012), replicas: [ReplicaState { replica_id: 1000010, group_id: 100001, term: 3, voted_for: 1000010, role: Leader, node_id: 0 }, ReplicaState { replica_id: 1000011, group_id: 100001, term: 3, voted_for: 1000010, role: Follower, node_id: 1 }, ReplicaState { replica_id: 1000012, group_id: 100001, term: 2, voted_for: 1000012, role: Leader, node_id: 2 }] }        

The group 100001 has two members who claim that it is the leader:

  • ReplicaState { replica_id: 1000010, group_id: 100001, term: 3, voted_for: 1000010, role: Leader, node_id: 0 }
  • ReplicaState { replica_id: 1000012, group_id: 100001, term: 2, voted_for: 1000012, role: Leader, node_id: 2 }

It is obviously that the replica 1000010 is the actually leader of this group, since it's term 3 is large than replica 1000012's 2. But the leader_id of GroupState is Some(1000012).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant