I’m at a total loss here, and sadly I can’t make a minimal set of data to reproduce this problem. I’m just hoping that by describing the problem you’ll be able to guide me down the right path towards resolving the issue.
I have a very long, generated query. Most of the time, it works perfectly fine, but every now and then, a very specific edge gets left out on multiple nodes. This behaviour happens both within my own application as in dgraph-ratel, which suggests there’s something happens within dgraph while the query is happening.
What’s curious is that when the data returned isn’t right, it’s always wrong in exactly the same way : a specific edge is missing on a certain type of node. This edge points to another node of the same type (a sibling) which will also be fetched (hence its information will appear twice in the JSON result, both as a sibling of the node, and as one level below)
What is random, however, is whether or not the results are wrong.
I know this is very abstract. I’m working on finding the simplest possible version of this problem to present later, unless I come across a solution, but any help would be appreciated.
------------ EDIT -------------
I believe the issue occurs because of a stray “orderdesc” in the query on a predicate which the node does not have. In the future I’ll be careful to avoid this, but shouldn’t “orderdesc” just be ignored if no such predicate is found? This sometimes-yes-sometimes-no behaviour is confusing!