Skip to content

Commit

Permalink
Fix for the breakage in the previous commit. Reset MapEntry after get…
Browse files Browse the repository at this point in the history
…ting from pool.
  • Loading branch information
manishrjain committed Aug 7, 2019
1 parent 800b443 commit 802ec4c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dgraph/cmd/bulk/mapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ func (m *mapper) addMapEntry(key []byte, p *pb.Posting, shard int) {
atomic.AddInt64(&m.prog.mapEdgeCount, 1)

me := m.mePool.Get().(*pb.MapEntry)
me.Key = key
*me = pb.MapEntry{Key: key}

if p.PostingType != pb.Posting_REF || len(p.Facets) > 0 {
me.Posting = p
Expand Down

0 comments on commit 802ec4c

Please sign in to comment.