File tree Expand file tree Collapse file tree 2 files changed +3
-0
lines changed
raft/src/main/scala/zio/raft Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -917,6 +917,8 @@ class Raft[S, A <: Command](
917917 s " memberId= ${this .memberId} validateLeadership: ${peersRequiringHeartbeat.length}/ ${peers.length} peers requiring heartbeat "
918918 )
919919
920+ // TODO (eran): TBD with Doron: as per Raft paper, we might want to always send heartbeat and not rely on the heartbeat due time
921+
920922 // If majority of peers don't require heartbeat, leadership is likely valid
921923 // peersRequiringHeartbeat.length < numberOfServers / 2 means:
922924 // - peers not requiring heartbeat + self > numberOfServers / 2 (majority)
Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ case class ClusterConfiguration(
4747):
4848 def numberOfServers = 1 + peers.length
4949
50+ // TODO (eran): is this correct? should it be numberOfServers / 2 + 1?
5051 def quorum = numberOfServers / 2
5152
5253trait Command :
You can’t perform that action at this time.
0 commit comments