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

Function updateStartTs

worker/draft.go:845–861  ·  view source on GitHub ↗
(p *pb.Proposal)

Source from the content-addressed store, hash-verified

843}
844
845func updateStartTs(p *pb.Proposal) {
846 switch {
847 case p.Mutations != nil:
848 p.StartTs = p.Mutations.StartTs
849 case p.Snapshot != nil:
850 p.StartTs = p.Snapshot.ReadTs
851 case p.Delta != nil:
852 p.StartTs = 0 // Run this asap.
853 case len(p.CleanPredicate) > 0 && p.StartTs == 0:
854 // proposal.StartTs did not exist earlier. So, it would be zero when reading an old
855 // proposal. This startTs is used for writing the schema.
856 // Hence, use the ts=1 for such proposals.
857 p.StartTs = 1
858 default:
859 // For now, not covering everything.
860 }
861}
862
863func (n *node) processApplyCh() {
864 defer n.closer.Done() // CLOSER:1

Callers 1

processApplyChMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected