-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Update RAFT checkpoint when doing a clean shutdown. #5097
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.
Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on @manishrjain and @martinmr)
dgraph/cmd/alpha/run.go, line 509 at r1 (raw file):
// Update checkpoint so that proposals are not replayed after the server restarts. if err := worker.UpdateRaftProgress(); err != nil {
This should be moved to worker.BlockingStop in worker.go.
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.
Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on @manishrjain)
dgraph/cmd/alpha/run.go, line 509 at r1 (raw file):
Previously, manishrjain (Manish R Jain) wrote…
This should be moved to worker.BlockingStop in worker.go.
Done.
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.
Reviewed 2 of 3 files at r2.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @manishrjain and @martinmr)
worker/worker.go, line 114 at r2 (raw file):
// Update checkpoint so that proposals are not replayed after the server restarts. glog.Infof("Updating RAFT state before shutting down...") if err := groups().Node.updateRaftProgress(); err != nil {
Might check and see if we need to move this after groups.closer (still keep it before node closer).
This will prevent the write ahead log from being replayed after the restart of the server.
This change is