Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: failure detection #332

Merged
merged 4 commits into from
Mar 1, 2024
Merged

fix: failure detection #332

merged 4 commits into from
Mar 1, 2024

Conversation

akiradeveloper
Copy link
Owner

@akiradeveloper akiradeveloper commented Feb 29, 2024

#331

Was based on a false recognition. What get_election_timeout should return is not the leader election timeout but the random timeout before becoming a candidate. This should be fixed.

Also, the code is bit unclear, which requires refactoring.

How to decide the timeout is very difficult problem because if we take an uniform distribution between [0,1000ms] then it will not have any guarantee that the election converges if there are 1000 nodes in a cluster.

@akiradeveloper akiradeveloper merged commit 03b38f4 into master Mar 1, 2024
1 check passed
@akiradeveloper akiradeveloper deleted the fix-timeout-2 branch March 1, 2024 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant