BlockingStop stops all the nodes, server between other workers and syncs all marks.
()
| 116 | |
| 117 | // BlockingStop stops all the nodes, server between other workers and syncs all marks. |
| 118 | func BlockingStop() { |
| 119 | glog.Infof("Stopping group...") |
| 120 | groups().closer.SignalAndWait() |
| 121 | |
| 122 | // Update checkpoint so that proposals are not replayed after the server restarts. |
| 123 | glog.Infof("Updating RAFT state before shutting down...") |
| 124 | if err := groups().Node.updateRaftProgress(); err != nil { |
| 125 | glog.Warningf("Error while updating RAFT progress before shutdown: %v", err) |
| 126 | } |
| 127 | |
| 128 | glog.Infof("Stopping node...") |
| 129 | groups().Node.closer.SignalAndWait() |
| 130 | |
| 131 | glog.Infof("Stopping worker server...") |
| 132 | workerServer.Stop() |
| 133 | |
| 134 | groups().Node.cdcTracker.Close() |
| 135 | } |
| 136 | |
| 137 | // UpdateCacheMb updates the value of cache_mb and updates the corresponding cache sizes. |
| 138 | func UpdateCacheMb(memoryMB int64) error { |