MCPcopy Create free account
hub / github.com/dgraph-io/dgraph / populateUidMap

Method populateUidMap

posting/list.go:342–351  ·  view source on GitHub ↗
(pl *pb.PostingList)

Source from the content-addressed store, hash-verified

340}
341
342func (mm *MutableLayer) populateUidMap(pl *pb.PostingList) {
343 if mm.currentUids != nil {
344 return
345 }
346
347 mm.currentUids = make(map[uint64]int, len(pl.Postings))
348 for i, post := range pl.Postings {
349 mm.currentUids[post.Uid] = i
350 }
351}
352
353// insertPosting inserts a new posting in the mutable layers. It updates the currentUids map.
354func (mm *MutableLayer) insertPosting(mpost *pb.Posting, hasCountIndex bool) {

Callers 2

setCurrentEntriesMethod · 0.95
insertPostingMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected