Query sometimes randomly fails in specific way

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!

It’s not quite clear what’s happening here. It might help me understand what’s happening if you could share the generated query or queries with an example responses and what you expected.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.