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

Bug: Follower not starting election timeout #41

Closed
lionesswardrobe opened this issue Feb 13, 2020 · 3 comments
Closed

Bug: Follower not starting election timeout #41

lionesswardrobe opened this issue Feb 13, 2020 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@lionesswardrobe
Copy link

Seems to happen when follower was previously transitioned from the leader state.
I'm not too familiar with the code but briefly looking at here:
https://github.com/railgun-rs/actix-raft/blob/fd0e34c2e133ea9950aa463ba4c30a824d2055be/src/raft/mod.rs#L291-L296

Should
if let Some(handle) = self.election_timeout {
here actually be
if let Some(handle) = self.election_timeout.take() {
instead?

@thedodd
Copy link
Collaborator

thedodd commented Feb 13, 2020

Hey @lionesswardrobe thanks for the bug report. Looking at that code, it looks like you are correct. I believe this is a compound issue where for some given node A.

Here is my plan of action:

  • update all of the locations in the code where this pattern is repeated (take the election_timeout handle and cancel it) and encapsulate it in a method so that it is not missed.
  • write a few tests to ensure this behavior.
  • cut a new release. Should be 0.4.3. There are already a few staged changes which will go out as part of the release as well. This is the only bug fix as part of that release though :).

Thanks again @lionesswardrobe!

@thedodd thedodd self-assigned this Feb 13, 2020
@thedodd thedodd added the bug Something isn't working label Feb 13, 2020
@thedodd
Copy link
Collaborator

thedodd commented Feb 13, 2020

Cutting 0.4.3 now.

@thedodd
Copy link
Collaborator

thedodd commented Feb 21, 2020

@lionesswardrobe just wanted to circle back with you here. Did 0.4.3 resolve the issue you were seeing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants