MCPcopy
hub / github.com/dgraph-io/dgraph / handleWal

Function handleWal

dgraph/cmd/debug/wal.go:203–217  ·  view source on GitHub ↗
(store *raftwal.DiskStorage)

Source from the content-addressed store, hash-verified

201}
202
203func handleWal(store *raftwal.DiskStorage) error {
204 rid := store.Uint(raftwal.RaftId)
205 gid := store.Uint(raftwal.GroupId)
206
207 fmt.Printf("Raft Id = %d Groupd Id = %d\n", rid, gid)
208 switch {
209 case len(opt.wsetSnapshot) > 0:
210 return overwriteSnapshot(store)
211 case opt.wtruncateUntil != 0:
212 store.TruncateEntriesUntil(opt.wtruncateUntil)
213 default:
214 printRaft(store)
215 }
216 return nil
217}

Callers 1

runFunction · 0.85

Calls 4

overwriteSnapshotFunction · 0.85
printRaftFunction · 0.85
TruncateEntriesUntilMethod · 0.80
UintMethod · 0.45

Tested by

no test coverage detected