-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
snapshot: some improvments to the snapshot process #17236
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.
Just a few suggestions for the docs. Approving so you're not blocked on my end.
Another side effect is that one snapshot file is also taken at `data_dir/raft/snapshops`, | ||
resulting from Raft snapshot. |
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.
Another side effect is that one snapshot file is also taken at `data_dir/raft/snapshops`, | |
resulting from Raft snapshot. | |
As a result of the Raft snapshot, Consul also saves one snapshot file at `data_dir/raft/snapshops`. |
Is that correct? Consul saves an additional snapshot triggered by the Raft snapshot?
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.
Yes, this is a result from the raft library.
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.
But I'd like to have an eng reviewer to confirm. Thanks, @trujillo-adam
Hi, @kisunji , this seems related to the logger work you presented yesterday, so add you as the reviewer. Thanks. |
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.
Even though it's just logging, I think we should have a changelog calling out the move from snapshot -> raft.snapshot
.
snapshot/snapshot.go
Outdated
@@ -53,6 +53,7 @@ func New(logger hclog.Logger, r *raft.Raft) (*Snapshot, error) { | |||
if err != nil { | |||
return nil, fmt.Errorf("failed to create snapshot file: %v", err) | |||
} | |||
logger.Info("creating temporary file of snapshot", "path", archive.Name()) |
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.
Should this be at the debug level? Wondering if it is useful for operators at the INFO level
dbdc105
to
928176c
Compare
Co-authored-by: trujillo-adam <[email protected]>
Co-authored-by: Chris S. Kim <[email protected]>
928176c
to
164cada
Compare
Description
snapshot: some improvments to the snapshot process
raft
to the snapshot logger because the log messages are from raft package, making it consistent with other snapshot logs likestarting snapshot up to
, which are from the raft package as well. Also it allows users know where to search for the logger messagePrint out the path of the temp snapshot file for trouble shooting
Update the doc a bit
PR Checklist