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

Method shardFor

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

Source from the content-addressed store, hash-verified

208}
209
210func (m *XidMap) shardFor(xid string) *shard {
211 fp := z.MemHashString(xid)
212 idx := fp % uint64(len(m.shards))
213 return m.shards[idx]
214}
215
216func (m *XidMap) CheckUid(xid string) bool {
217 sh := m.shardFor(xid)

Callers 4

NewFunction · 0.95
CheckUidMethod · 0.95
SetUidMethod · 0.95
AssignUidMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected