Skip to content

Commit

Permalink
fix(Dgraph): update reverse index when updating single UID predicates. (
Browse files Browse the repository at this point in the history
#5868)

When updating a single uid predicate with a reverse index, the existing entry in the
reverse index should be deleted first.

Fixes DGRAPH-1738
  • Loading branch information
martinmr authored and danielmai committed Oct 22, 2020
1 parent d377b2f commit 38010b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion posting/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ func (txn *Txn) addReverseAndCountMutation(ctx context.Context, t *pb.DirectedEd
Attr: t.Attr,
Op: pb.DirectedEdge_DEL,
}
return txn.addReverseAndCountMutation(delEdge)
return txn.addReverseAndCountMutation(ctx, delEdge)
})
if err != nil {
return errors.Wrapf(err, "cannot remove existing reverse index entries for key %s",
Expand Down

0 comments on commit 38010b5

Please sign in to comment.