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

Method proposeCDCState

worker/draft.go:1108–1120  ·  view source on GitHub ↗
(ts uint64)

Source from the content-addressed store, hash-verified

1106}
1107
1108func (n *node) proposeCDCState(ts uint64) error {
1109 proposal := &pb.Proposal{
1110 CdcState: &pb.CDCState{
1111 SentTs: ts,
1112 },
1113 }
1114 glog.V(2).Infof("Proposing new CDC state ts: %d\n", ts)
1115 sz := proto.Size(proposal)
1116 data := make([]byte, 8+sz)
1117 x.Check2(x.MarshalToSizedBuffer(data[8:], proposal))
1118 data = data[:8+sz]
1119 return n.Raft().Propose(n.ctx, data)
1120}
1121
1122func (n *node) proposeSnapshot() error {
1123 lastIdx := x.Min(n.Applied.DoneUntil(), n.cdcTracker.getSeenIndex())

Callers 1

processCDCEventsMethod · 0.80

Calls 5

Check2Function · 0.92
MarshalToSizedBufferFunction · 0.92
InfofMethod · 0.80
RaftMethod · 0.80
SizeMethod · 0.45

Tested by

no test coverage detected