(ids *pb.AssignedIds)
| 280 | } |
| 281 | |
| 282 | func (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. |
| 298 | func (o *Oracle) MaxPending() uint64 { |
no test coverage detected