Skip to content

Comments

NRG: prevent peer remove of the last peer#7610

Merged
neilalexander merged 1 commit intomainfrom
raft-prevent-remove-last-peer
Dec 4, 2025
Merged

NRG: prevent peer remove of the last peer#7610
neilalexander merged 1 commit intomainfrom
raft-prevent-remove-last-peer

Conversation

@sciascid
Copy link
Contributor

@sciascid sciascid commented Dec 4, 2025

Make sure that a Raft cluster cannot remove its last remaining peer. Attempting to remove the last peer will now return an error, preventing the cluster from entering an invalid state.

Test TestNRGProposeRemovePeerFollowers has been renamed to TestNRGProposeRemovePeerFollowers and updated to cover this new behavior, specifically testing the scenario where an attempt is made to remove the leader when it is the only remaining peer.

Signed-off-by: Daniele Sciascia daniele@nats.io

@sciascid sciascid requested a review from a team as a code owner December 4, 2025 13:35
Copy link
Member

@MauriceVanVeen MauriceVanVeen left a comment

Choose a reason for hiding this comment

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

LGTM

Make sure that a Raft cluster cannot remove its last remaining peer.
Attempting to remove the last peer will now return an error, preventing
the cluster from entering an invalid state.

Test TestNRGProposeRemovePeerFollowers has been renamed to
TestNRGProposeRemovePeerFollowers and updated to cover this new
behavior, specifically testing the scenario where an attempt is made
to remove the leader when it is the only remaining peer.

Signed-off-by: Daniele Sciascia <daniele@nats.io>
@sciascid sciascid force-pushed the raft-prevent-remove-last-peer branch from ae60841 to 0e0ab6f Compare December 4, 2025 13:55
Copy link
Member

@neilalexander neilalexander left a comment

Choose a reason for hiding this comment

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

LGTM

@neilalexander neilalexander merged commit db20f8d into main Dec 4, 2025
110 of 114 checks passed
@neilalexander neilalexander deleted the raft-prevent-remove-last-peer branch December 4, 2025 17:19
neilalexander added a commit that referenced this pull request Dec 5, 2025
Includes the following:

- #7581
- #7585
- #7586
- #7565
- #7588
- #7593
- #7589
- #7594
- #7595
- #7596
- #7597
- #7598
- #7600
- #7601
- #7602
- #7604
- #7605
- #7607
- #7609
- #7610
- #7616
- #7614

Signed-off-by: Neil Twigg <neil@nats.io>
neilalexander added a commit that referenced this pull request Dec 18, 2025
Includes the following:

- #7553
- #7555
- #7579
- #7578
- #7581
- #7585
- #7586
- #7588
- #7593
- #7594
- #7595
- #7596
- #7597
- #7598
- #7601
- #7604
- #7605
- #7610
- #7616
- #7614
- #7622
- #7619
- #7624
- #7625
- #7627
- #7636
- #7637
- #7643
- #7648
- #7634
- #7655
- #7656

Signed-off-by: Neil Twigg <neil@nats.io>
neilalexander added a commit that referenced this pull request Jan 6, 2026
Includes the following:

- #7565
- #7589
- #7600
- #7602
- #7609
- #7610
- #7632
- #7649
- #7642
- #7658
- #7659
- #7661
- #7662
- #7663
- #7668
- #7683
- #7685
- #7686
- #7678
- #7691
- #7696
- #7698
- #7699
- #7700

Signed-off-by: Neil Twigg <neil@nats.io>
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.

3 participants