Skip to content
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

Merged
merged 4 commits into from Apr 7, 2020
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions worker/worker.go
Expand Up @@ -109,6 +109,12 @@ func StoreStats() string {

// BlockingStop stops all the nodes, server between other workers and syncs all marks.
func BlockingStop() {
// 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 {
glog.Warningf("Error while updating RAFT progress before shutdown: %v", err)
}

glog.Infof("Stopping group...")
groups().closer.SignalAndWait()

Expand Down