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

Method updateMaxSeen

xidmap/xidmap.go:293–303  ·  view source on GitHub ↗
(max uint64)

Source from the content-addressed store, hash-verified

291}
292
293func (m *XidMap) updateMaxSeen(max uint64) {
294 for {
295 prev := atomic.LoadUint64(&m.maxUidSeen)
296 if prev >= max {
297 return
298 }
299 if atomic.CompareAndSwapUint64(&m.maxUidSeen, prev, max) {
300 return
301 }
302 }
303}
304
305// BumpTo can be used to make Zero allocate UIDs up to this given number. Attempts are made to
306// ensure all future allocations of UIDs be higher than this one, but results are not guaranteed.

Callers 2

NewFunction · 0.95
BumpToMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected