GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: FlexiRaft static quorums by lshir · Pull Request #638 · rabbitmq/ra

Conversation

@lshir

@lshir lshir commented Jun 19, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Proposed Changes

Adds support for the simplest optimization from FlexiRaft #500 : static quorums not confined to the classic majority.

Operators can configure a static data-commit quorum size. In particular, this is useful if it is set below the classic majority - allowing data to be committed with fewer acks. To guarantee safety, the leader election quorum is increased, forcing the property that the data commit quorum and the leader election quorum intersect (|Qd| + |Qe| > N)

Out of scope:

  • dynamic quorums and quorums-of-sets as defined in FlexiRaft, or other optimizations pertaining to cluster resize
  • consistent-read query path (bound to classic majority)

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.

  • Mandatory: I (or my employer/client) have have signed the CA (see https://github.com/rabbitmq/cla)
  • I have read the CONTRIBUTING.md document
  • 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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

lin72h reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
lshir added 21 commits June 19, 2026 13:49
@lshir
agreed_commit/2
f53c0c0
@lshir
some tests for agreed_commit/2
274d881
@lshir
wip static data commit quorum stuff
64be1cd
@lshir
required_quorum_count tests
45315f2
@lshir
fix head
40c0313
@lshir
candidate_election_quorum test
b6adec5
@lshir
some more colorful examples for agreed_commit_test
a9effcc
@lshir
test passes to append_entries_reply_success_quorum
9465c9a
@lshir
comment
5acf1ad
@lshir
flexiraft config
0bd6da7
@lshir
untabify
6777745
@lshir
validate_flexiraft_config
c0d5c8c
@lshir
tweaks
b330df0
@lshir
tyep fix
2cd4ee4
@lshir
some clean up
13882cb
@lshir
cosmetic
104d152
@lshir
wrap lines
2052ca0
@lshir
cosmetic
73964a6
@lshir
test for bad size quorum
b9d3eaa
@lshir
test for smaller than quorum
8227a8d
@lshir
cleanup
a4d267d
@lshir lshir mentioned this pull request Jun 19, 2026
Flexible quorums for even sized clusters #500
Closed
@lshir
empty trigger
49fdd9e
@lshir lshir mentioned this pull request Jun 22, 2026
ci: temporary fix for windows-latest changed #639
Merged
3 of 11 tasks
@kjnilsson
kjnilsson requested a review from Copilot June 22, 2026 11:01
Copilot started reviewing on behalf of kjnilsson June 22, 2026 11:02
View session
Copilot AI reviewed Jun 22, 2026
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds FlexiRaft “static quorum” support to Ra, allowing operators to configure a fixed data-commit quorum size (potentially below classic majority) while increasing the election quorum to preserve quorum intersection safety.

Changes:

  • Introduces #flexiraft_cfg{} and stores it in the server #cfg{} record to control quorum behavior.
  • Updates leader commit-index advancement and election/pre-vote quorum calculations to support static data-commit quorums.
  • Adds new unit/integration tests covering commit and election behavior under static quorum settings.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
test/ra_server_SUITE.erl Adds suite tests validating commit and election behavior under static quorum configuration.
src/ra_server.hrl Introduces FlexiRaft config record/type and embeds it into the server config record.
src/ra_server.erl Implements static data-commit quorum calculation, adjusts election quorum logic, validates FlexiRaft config at init, and expands internal unit tests.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/ra_server.erl
Comment on lines +373 to +374
Flexi = maps:get(flexiraft_config, Config, #flexiraft_cfg{}),
ok = validate_flexiraft_config(Flexi, length(InitialNodes)),
Comment thread src/ra_server.erl
Comment on lines +4277 to +4278
% 2 servers - all servers have seen new commit
4 = agreed_commit([4, 4, 4], 2),
@kjnilsson

kjnilsson commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

thank you, I never envisaged having specific configuration for this feature but rather just implement the optimisation for even sized clusters in #500 and just have that the default (and perhaps only) behaviour. One of the main performance considerations for Ra is how the replication is done and how it gets linearly slower with the number of cluster members. Flexible quorums don't address that aspect, in fact I am not sure they are as useful as they might initially seem to be. Unless member latency is rather variable you aren't really going to commit that much faster by reducing the required set a little once you take the network write + fsync write into account. It is useful for availability in even sized clusters though.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@lshir

lshir commented Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

thank you, I never envisaged having specific configuration for this feature but rather just implement the optimisation for even sized clusters in #500 and just have that the default (and perhaps only) behaviour. One of the main performance considerations for Ra is how the replication is done and how it gets linearly slower with the number of cluster members. Flexible quorums don't address that aspect, in fact I am not sure they are as useful as they might initially seem to be. Unless member latency is rather variable you aren't really going to commit that much faster by reducing the required set a little once you take the network write + fsync write into account. It is useful for availability in even sized clusters though.

Ok, thanks for the response! I will close this PR and rework it to address even-only.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@lshir lshir closed this Jun 23, 2026
This was referenced Jul 3, 2026
feat: FlexiRaft even data commit quorums #642
Closed
feat: FlexiRaft for even-sized data commit quorums #643
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Copilot left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@lshir @kjnilsson
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.