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

Method CheckUid

xidmap/xidmap.go:216–222  ·  view source on GitHub ↗
(xid string)

Source from the content-addressed store, hash-verified

214}
215
216func (m *XidMap) CheckUid(xid string) bool {
217 sh := m.shardFor(xid)
218 sh.RLock()
219 defer sh.RUnlock()
220 uid := sh.tree.Get(farm.Fingerprint64([]byte(xid)))
221 return uid != 0
222}
223
224func (m *XidMap) SetUid(xid string, uid uint64) {
225 sh := m.shardFor(xid)

Callers 1

upsertUidsMethod · 0.80

Calls 4

shardForMethod · 0.95
RLockMethod · 0.80
RUnlockMethod · 0.80
GetMethod · 0.65

Tested by

no test coverage detected