(ts uint64)
| 1106 | } |
| 1107 | |
| 1108 | func (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 | |
| 1122 | func (n *node) proposeSnapshot() error { |
| 1123 | lastIdx := x.Min(n.Applied.DoneUntil(), n.cdcTracker.getSeenIndex()) |
no test coverage detected