You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Switch from using gocron for the election timeout timer, to time.Timer.
This seems to fix the issue causing the timer to stop once a leader is
found.
However, the fix requires we track when last the leader last sent a
heartbeat in all the followers. This is because the timers created using
time.AfterFunc seem to fire even when the timer is stopped.
Fixes#2
Related to #3
Signed-off-by: Jason Rogena <[email protected]>
Switch from using gocron for the election timeout timer, to time.Timer.
This seems to fix the issue causing the timer to stop once a leader is
found.
However, the fix requires we track when last the leader last sent a
heartbeat in all the followers. This is because the timers created using
time.AfterFunc seem to fire even when the timer is stopped.
Fixes#2
Related to #3
Signed-off-by: Jason Rogena <[email protected]>
Election timers are stopped then started again whenever a heartbeat is received from the leader. It seems the stopped timers still fire.
The text was updated successfully, but these errors were encountered: