K Shortest Path query returns path that doesn't have the `to` node

daver208
Mon, 31 Aug 2020 14:22:54 +0000
Dgraph

Dgraph v20.03.4
Running in a Docker container on Mac OS 10.14.6. I’ve got 24 GB of RAM for Docker.

So I can’t share my data which makes replication difficult, but I’ve come across an issue with the K-shortest path query, where the ‘shortest’ path doesn’t contain the to UID. It appears that somehow there is a path, and that the weight of the path is below the threshold, but the path itself is more ‘hops’ away than the depth allows.

0x68 is a highly connected node and this seems common to this issue. It’s like the weights for some of the edges are 0 and so the total weight of the path is lower than any other path, but the result doesn’t contain the to node. Since the order of the paths aren’t guaranteed this result seems to happen maybe 20% of the time, but one would expect this result to always show up in the results as it’s weight is lower than the other paths. All of the other paths in the result have a weight of 4, but they do include the from and to UID. The first image is the bug, since I can only upload one image, the second case would also have a weight of 2, but it would only have 3 UIDs and the to and from uid would be in the result.

16 posts - 3 participants