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

RATIS-758. Illegal state transition in LeaderElection: RUNNING to CLOSED #48

Closed
wants to merge 3 commits into from

Conversation

adoroszlai
Copy link
Contributor

What changes were proposed in this pull request?

Make sure LeaderElection is transitioned to CLOSED via CLOSING. Even if askForVotes has no chance for any iteration due to already being changed to follower.

The first commit contains repro code, and can be dropped or reworked, eg. if mocking or exposing some methods only for testing is not desirable.

The second commit is the fix itself.

https://issues.apache.org/jira/browse/RATIS-758

How was this patch tested?

Added unit test case to reproduce the problem and verify the fix. Currently running all tests to check for regressions.

@adoroszlai
Copy link
Contributor Author

Needs another update to avoid CLOSING -> RUNNING, too.

@adoroszlai
Copy link
Contributor Author

The third commit fixes CLOSING/CLOSED -> STARTING/RUNNING illegal transitions.

@adoroszlai
Copy link
Contributor Author

@szetszwo @bshashikant please review when you have some time

@szetszwo
Copy link
Contributor

@adoroszlai , please post the patch in the JIRA. Jenkins is not yet working with Ratis.

@adoroszlai
Copy link
Contributor Author

Closed by c0721c1.

@adoroszlai adoroszlai closed this Nov 22, 2019
@adoroszlai adoroszlai deleted the RATIS-758 branch November 22, 2019 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants