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

Method storePending

dgraph/cmd/zero/oracle.go:282–295  ·  view source on GitHub ↗
(ids *pb.AssignedIds)

Source from the content-addressed store, hash-verified

280}
281
282func (o *Oracle) storePending(ids *pb.AssignedIds) {
283 // Wait to finish up processing everything before start id.
284 max := x.Max(ids.EndId, ids.ReadOnly)
285 if err := o.doneUntil.WaitForMark(context.Background(), max); err != nil {
286 glog.Errorf("Error while waiting for mark: %+v", err)
287 }
288
289 // Now send it out to updates.
290 o.updates <- &pb.OracleDelta{MaxAssigned: max}
291
292 o.Lock()
293 defer o.Unlock()
294 o.maxAssigned = x.Max(o.maxAssigned, max)
295}
296
297// MaxPending returns the maximum assigned timestamp.
298func (o *Oracle) MaxPending() uint64 {

Callers 1

TimestampsMethod · 0.80

Calls 4

MaxFunction · 0.92
ErrorfMethod · 0.45
LockMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected