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

Function getEntryForMutation

worker/draft_test.go:21–28  ·  view source on GitHub ↗
(index, startTs uint64)

Source from the content-addressed store, hash-verified

19)
20
21func getEntryForMutation(index, startTs uint64) raftpb.Entry {
22 proposal := &pb.Proposal{Mutations: &pb.Mutations{StartTs: startTs}}
23 sz := proto.Size(proposal)
24 data := make([]byte, 8+sz)
25 x.Check2(x.MarshalToSizedBuffer(data[8:], proposal))
26 data = data[:8+sz]
27 return raftpb.Entry{Index: index, Term: 1, Type: raftpb.EntryNormal, Data: data}
28}
29
30func getEntryForCommit(index, startTs, commitTs uint64) raftpb.Entry {
31 delta := &pb.OracleDelta{}

Callers 1

TestCalculateSnapshotFunction · 0.85

Calls 3

Check2Function · 0.92
MarshalToSizedBufferFunction · 0.92
SizeMethod · 0.45

Tested by

no test coverage detected