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

Test case for #306 #314

Merged
merged 8 commits into from
Oct 24, 2024
Merged

Test case for #306 #314

merged 8 commits into from
Oct 24, 2024

Conversation

yfei-z
Copy link
Contributor

@yfei-z yfei-z commented Oct 10, 2024

Here is the test case for the issue that described in #306

yfei-z and others added 2 commits October 10, 2024 16:08
* Only stop voting thread if the leader elected message successfully
  installs new leader.
* Leader is only installed if the term allows.
@jabolina
Copy link
Member

@yfei-z, many thanks for coming up with a reproducer! I've added a commit with a solution.

@yfei-z yfei-z closed this Oct 12, 2024
@yfei-z yfei-z deleted the master2 branch October 12, 2024 03:36
@yfei-z yfei-z restored the master2 branch October 12, 2024 03:38
@yfei-z yfei-z reopened this Oct 12, 2024
@yfei-z
Copy link
Contributor Author

yfei-z commented Oct 14, 2024

I have updated the test, check my comments.

@jabolina
Copy link
Member

Thanks, @yfei-z. It is reproducing the issue on my side +1
Instead of interrupting the voting thread, I'd allow it to run until elected (or in the case of the leader not null and the majority lost). I'll push a commit with the fix once it is in place. Thanks again!

* Set a boolean to eventually stop the voting thread. Only interrupt in
  case of majority loss;
* The voting thread can complete execution and then stop once the
  election is done.
@jabolina
Copy link
Member

@yfei-z I've added a commit with the changes I had in mind. We only interrupt the voting thread in case the majority is lost. Otherwise, we allow it to stop eventually.

@yfei-z
Copy link
Contributor Author

yfei-z commented Oct 23, 2024

Seems all good!

@jabolina jabolina linked an issue Oct 24, 2024 that may be closed by this pull request
@jabolina jabolina added this to the 1.0.15 milestone Oct 24, 2024
@jabolina jabolina added the bug label Oct 24, 2024
@jabolina jabolina merged commit 6393b08 into jgroups-extras:master Oct 24, 2024
3 checks passed
@jabolina
Copy link
Member

Glad to hear it, many thanks, @yfei-z!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Election problem when merging from partitions
2 participants