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

Exclude non_voter server from quorum calculation #427

Merged
merged 4 commits into from
May 17, 2024

Conversation

sile
Copy link
Contributor

@sile sile commented Mar 29, 2024

Proposed Changes

In my understanding, non_voter servers (introduced in #375) have to be handled as same as promotable servers except for the latter could promote to voter.
However, the current implementation seems to include non_voter servers in the quorum (while promotable servers are excluded from that).
This PR fixes the issue by excluding non_voter server from quorum calculation.
Feel free to close this PR if I misunderstand something.

Types of Changes

What types of changes does your code introduce to this project?
Put an x in the boxes that apply

  • Bug fix (non-breaking change which fixes issue #NNNN)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation (correction or otherwise)
  • Cosmetics (whitespace, appearance)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating
the PR. If you're unsure about any of them, don't hesitate to ask on the
mailing list. We're here to help! This is simply a reminder of what we are
going to look for before merging your code.

  • I have read the CONTRIBUTING.md document
  • I have signed the CA (see https://cla.pivotal.io/sign/rabbitmq)
  • All tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • Any dependent changes have been merged and published in related repositories

Further Comments

If this is a relatively large or complex change, kick off the discussion by
explaining why you chose the solution you did and what alternatives you
considered, etc.

@illotum
Copy link
Collaborator

illotum commented Apr 25, 2024

You got it right.

For other reviewers context, non_voter are a plug for future passive witness API, but implementation was cut down to simplify the original review. There is no ra API to add non_voters atm, it is a "hidden" feature.

In this light, @sile would you be able to re-work counting functions to include all possible states? Perhaps invert it to only include voter.

-type ra_membership() :: voter | promotable | non_voter | unknown.

@michaelklishin
Copy link
Member

@illotum thank you for chiming in!

@sile
Copy link
Contributor Author

sile commented Apr 26, 2024

@illotum Sounds good! (fixed in 924c024)

@sile
Copy link
Contributor Author

sile commented May 16, 2024

This PR has received one approval (thanks, @michaelklishin!). What is holding it back from being merged?

@lukebakken
Copy link
Contributor

What is holding it back from being merged?

@sile, please be patient. Team RabbitMQ and @kjnilsson in particular are busy working on higher-priority work, some of which is for customers who pay for RabbitMQ.

We will merge this PR when time allows.

@sile
Copy link
Contributor Author

sile commented May 17, 2024

@lukebakken I see. Thank you for sharing the reason!

@michaelklishin michaelklishin merged commit ad6bb7d into rabbitmq:main May 17, 2024
8 of 10 checks passed
@michaelklishin michaelklishin added this to the 2.11.0 milestone May 17, 2024
@michaelklishin
Copy link
Member

I don't know if the next release will be 2.11.0 or 2.10.1 but let's stick to 2.11.0 as the milestone for now.

@sile sile deleted the fix-non-voter branch May 17, 2024 21:06
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.

None yet

5 participants