-
Notifications
You must be signed in to change notification settings - Fork 995
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a config option specifying no snapshot restore on startup #340
Conversation
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.
I left two comments about the same thing. And I guess the answer will also account for my last question: why isn't the whole RecoverCluster
function executed conditionally. It seems like we don't restore snapshots, but still apply their metadata?
|
||
r.logger.Info(fmt.Sprintf("Restored from snapshot %v", snapshot.ID)) | ||
} | ||
// Update the lastApplied so we don't replay old logs | ||
r.setLastApplied(snapshot.Index) |
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.
Is it correct to leave this here since nothing was actually restored?
if err != nil { | ||
// Same here, skip and try the next one. | ||
continue | ||
} | ||
} | ||
|
||
snapshotIndex = snapshot.Index |
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.
Is it correct to leave this here since nothing was actually restored?
@i0rek Good question, yeah we still need a way to tell Raft which index the FSM is currently at even if we don't need to restore a snapshot to the FSM. This way if there are still pending logs they will be replayed on top of the FSM. The Snapshot Metadata is still used to do this. In Vault's case the snapshot metadata represents the current state of the FSM. |
Test failure just normal flakiness; merging. |
No description provided.