Partial edge removal with 20.03.4-rc2 and 20.07.0-rc1

I wrote a minimal go program that reproduces the issue.
The problem is slightly different than I thought.

It happens when I remove an edge and add another one from the same node in a single transaction.
The result is the former one is not removed, thus leading to 2 outgoing edges, even if it is defined as 1:1 in the schema.

If I use 2 separate transactions, it works fine.

dgraph_edge_not_removed.go (3.3 KB)