Skip to content

Commit

Permalink
Workaround for issue #3642. (#3670)
Browse files Browse the repository at this point in the history
For some reason, there are nil values stored in the uidMatrix, which
results in a segmentation fault when trying to access the Uids field.
The root cause of this issue is still unclear but this change adds an
additional check to prevent the segmentation fault.
  • Loading branch information
martinmr authored Jul 15, 2019
1 parent 85e0b45 commit e1efaa3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion query/groupby.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,9 @@ func (sg *SubGraph) formResult(ul *pb.List) (*groupResults, error) {
if algo.IndexOf(ul, srcUid) < 0 {
continue
}

ul := child.uidMatrix[i]
for _, uid := range ul.Uids {
for _, uid := range ul.GetUids() {
dedupMap.addValue(attr, types.Val{Tid: types.UidID, Value: uid}, srcUid)
}
}
Expand Down

0 comments on commit e1efaa3

Please sign in to comment.