diff --git a/worker/worker.go b/worker/worker.go index ad0b8f6afb5..cf11139a24a 100644 --- a/worker/worker.go +++ b/worker/worker.go @@ -112,6 +112,12 @@ func BlockingStop() { glog.Infof("Stopping group...") groups().closer.SignalAndWait() + // 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 node...") groups().Node.closer.SignalAndWait()