Skip to content

Mark *new* local replicas as locally-disabled, when recovering Raft snapshot#7684

Merged
generall merged 3 commits intodevfrom
raft-snapshot-fix
Dec 3, 2025
Merged

Mark *new* local replicas as locally-disabled, when recovering Raft snapshot#7684
generall merged 3 commits intodevfrom
raft-snapshot-fix

Conversation

@ffuugoo
Copy link
Contributor

@ffuugoo ffuugoo commented Dec 3, 2025

Prior condition would incorrectly try to mark last active replica as Dead and crash the consensus.

All Submissions:

  • Contributions should target the dev branch. Did you create your branch from dev?
  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

New Feature Submissions:

  1. Does your submission pass tests?
  2. Have you formatted your code locally using cargo +nightly fmt --all command prior to submission?
  3. Have you checked your code using cargo clippy --all --all-features command?

Changes to Core Features:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully ran tests with your changes locally?

@ffuugoo ffuugoo requested a review from generall December 3, 2025 13:10
@coderabbitai

This comment was marked as resolved.

Copy link
Member

@timvisee timvisee left a comment

Choose a reason for hiding this comment

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

As I understood it this may try to kill the last replica unconditionally, causing a panic and crash.

@ffuugoo ffuugoo changed the title Remove faulty mark-as-dead condition when recovering Raft snapshot Mark *new* local replicas as locally-disabled, when recovering Raft snapshot Dec 3, 2025
coderabbitai[bot]

This comment was marked as resolved.

@ffuugoo
Copy link
Contributor Author

ffuugoo commented Dec 3, 2025

Added test. Fails without the fix, works with the fix.

coderabbitai[bot]

This comment was marked as resolved.

@generall generall merged commit 4c9b843 into dev Dec 3, 2025
15 checks passed
@generall generall deleted the raft-snapshot-fix branch December 3, 2025 17:12
timvisee pushed a commit that referenced this pull request Dec 4, 2025
…napshot (#7684)

* Remove faulty mark-as-dead condition when recovering Raft snapshot 😅

* Mark new local replicas as locally-disabled when recovering Raft snapshot

* Add test
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