MCPcopy Create free account
hub / github.com/dgraph-io/dgraph / BlockingStop

Function BlockingStop

worker/worker.go:118–135  ·  view source on GitHub ↗

BlockingStop stops all the nodes, server between other workers and syncs all marks.

()

Source from the content-addressed store, hash-verified

116
117// BlockingStop stops all the nodes, server between other workers and syncs all marks.
118func 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.
138func UpdateCacheMb(memoryMB int64) error {

Callers 1

runFunction · 0.92

Calls 6

groupsFunction · 0.85
InfofMethod · 0.80
updateRaftProgressMethod · 0.80
WarningfMethod · 0.80
StopMethod · 0.65
CloseMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…