Concurrent upserts creating aborted transactions

@mrjn You mentioned:

“In general, all folks here, if you have slow queries, please post them in Discuss, and tag me or @dmai. We’re looking for ways to optimize Dgraph”

(Query Performance - #5 by MichelDiz)

There are two issues that I’ve mentioned in this thread, but the root issue is related to a concurrency problem.

We have data structured like this in Dgraph:

In the diagram, blue nodes are existing nodes, and red nodes/edges represent nodes that can be created or edited via an upsert.

My concern is that it appears that the entire root node is getting locked from all of the upsert cases (as per the diagram). This behavior would be equivalent to locking an entire table when only specific rows need to be edited or added, like in the diagram below:

Can someone please confirm if this is not the case? If it’s the case, then it’s a serious architectural/design flaw in Dgraph that needs to be urgently corrected.