Update RAFT checkpoint when doing a clean shutdown.#5097
Conversation
manishrjain
left a comment
There was a problem hiding this comment.
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.
martinmr
left a comment
There was a problem hiding this comment.
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.
manishrjain
left a comment
There was a problem hiding this comment.
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