Skip to content

fix: update node state after installSnapshot#60

Open
Qian-Cheng-nju wants to merge 3 commits intowenweihu86:masterfrom
specula-org:fix/install-snapshot-state-update
Open

fix: update node state after installSnapshot#60
Qian-Cheng-nju wants to merge 3 commits intowenweihu86:masterfrom
specula-org:fix/install-snapshot-state-update

Conversation

@Qian-Cheng-nju
Copy link
Copy Markdown

@Qian-Cheng-nju Qian-Cheng-nju commented Mar 25, 2026

Hi!

I noticed that the installSnapshot handler doesn't update commitIndex, lastAppliedIndex, or configuration after applying a snapshot. After a snapshot install with lastIncludedIndex=100, the node continues operating with its old commitIndex (e.g. 5).

The RaftNode constructor (RaftNode.java:88-112) correctly initializes these from snapshot metadata on startup, so this is just a missing update in the runtime installSnapshot path.

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.

1 participant