Commit Graph

8 Commits (master)

Author SHA1 Message Date
Vitaliy Filippov 9bf5db2272 Send heartbeats to all nodes (not just followers) if leadership expiration is disabled
Otherwise, the following situation may happen:
- Node 1 is the leader and its term is 24
- Node 2 is a follower of 1, its term is 24 too
- Node 3 also thinks he's the leader, his term is 23, and he doesn't know that a new leader is elected
2024-05-17 11:31:01 +03:00
Vitaliy Filippov aba4525570 Fix missing onChange event when following a leader with greater term 2024-05-16 23:26:02 +03:00
Vitaliy Filippov 857cf668f2 Fix leader change event 2024-05-07 15:06:21 +03:00
Vitaliy Filippov 0947d0d61a Implement leader priorities, fix changing nodes 2024-04-30 11:48:55 +03:00
Vitaliy Filippov 7e11ac2477 Make node join existing quorum when seeing a VOTE message for larger term
Fixes testAdd and testRestart (with initialTerm = 1000)
2023-09-29 00:52:47 +03:00
Vitaliy Filippov c96a762ffc Split long if-elseif into functions 2023-09-29 00:39:29 +03:00
Vitaliy Filippov a6893ea494 Fix "leadership expiration" 2023-07-06 20:16:58 +03:00
Vitaliy Filippov 7aef34f5bf Initial commit 2023-06-28 02:06:43 +03:00