feat: FlexiRaft for even-sized data commit quorums - #643
Conversation
There was a problem hiding this comment.
Pull request overview
Implements the FlexiRaft optimization for data commit quorums in even-sized clusters by allowing commits with N div 2 (instead of classic majority N div 2 + 1) when cluster membership is stable, while keeping election and query quorums unchanged.
Changes:
- Adjusts leader commit-index advancement to use a reduced data commit quorum for even voter counts when
cluster_change_permitted = true. - Adds/updates unit and integration tests covering the even-quorum commit behavior and related quorum helpers.
- Documents the flexible quorum behavior in internal docs.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
test/ra_SUITE.erl |
Fixes a minor comment typo in an existing test. |
test/ra_server_SUITE.erl |
Adds an even-quorum commit test and updates existing expectations/ordering in leader handling tests. |
src/ra_server.erl |
Introduces data_commit_quorum_size/2 and agreed_commit/2 to support reduced data commit quorums for even voter counts. |
docs/internals/INTERNALS.md |
Adds internal documentation describing the flexible quorum optimization and when it is applied. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Tick the box to add this pull request to the merge queue (same as
|
…voter even quorum colision
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
fe4eada to
f1869a9
Compare
|
Can I get a review? |
|
@kjnilsson This has been open and green for several weeks, would you be able to review or assign a reviewer? I am happy to revise or rescope if it helps. Thanks! |
thanks @lshir - we will get to this when we can. right now we're focussed on the next RabbitMQ release - if we can get to it before then we will else it will be after. |
Sounds good, thanks! |
Proposed Changes
Replaces #638 and #642 - implementing only the data commit quorum optimization for even clusters described in #500
For even-sized clusters, we can commit an entry with N div 2 rather than N div 2 + 1 acks. This change is only applied to clusters that are not changing in size, and we do not touch the query quorum path. We also only apply for clusters with N>=4 so that a single node does not constitute a quorum.
Types of Changes
What types of changes does your code introduce to this project?
Put an
xin the boxes that applyChecklist
Put an
xin the boxes that apply. You can also fill these out after creatingthe 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.
CONTRIBUTING.mddocumentFurther 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.