MCPcopy Index your code
hub / github.com/dgraph-io/dgraph / InitServerState

Function InitServerState

worker/server_state.go:63–78  ·  view source on GitHub ↗

InitServerState initializes this server's state.

()

Source from the content-addressed store, hash-verified

61
62// InitServerState initializes this server's state.
63func InitServerState() {
64 Config.validate()
65
66 State.FinishCh = make(chan struct{})
67 State.needTs = make(chan tsReq, 100)
68
69 State.InitStorage()
70 go State.fillTimestampRequests()
71
72 groupId, err := x.ReadGroupIdFile(Config.PostingDir)
73 if err != nil {
74 glog.Warningf("Could not read %s file inside posting directory %s.", x.GroupIdFileName,
75 Config.PostingDir)
76 }
77 x.WorkerConfig.ProposedGroupId = groupId
78}
79
80func setBadgerOptions(opt badger.Options) badger.Options {
81 opt = opt.WithSyncWrites(false).

Callers 1

runFunction · 0.92

Calls 5

ReadGroupIdFileFunction · 0.92
InitStorageMethod · 0.80
fillTimestampRequestsMethod · 0.80
WarningfMethod · 0.80
validateMethod · 0.45

Tested by

no test coverage detected