Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shortest path query returns paths with repeated nodes. #5426

Closed
all-seeing-code opened this issue May 12, 2020 · 1 comment
Closed

Shortest path query returns paths with repeated nodes. #5426

all-seeing-code opened this issue May 12, 2020 · 1 comment
Assignees
Labels
area/querylang/algos Related to graph algorithms, such as k-shortest path. status/accepted We accept to investigate/work on it.

Comments

@all-seeing-code
Copy link
Contributor

What version of Dgraph are you using?

Dgraph version : v2.0.0-rc1-307-gf9d850994
Dgraph SHA-256 : b28d687729c9a1ec7642ea1797d800140c374f82c0ebab4f4e5e576f3676a374
Commit SHA-1 : f9d8509
Commit timestamp : 2020-05-11 05:19:53 +0530
Branch : master
Go version : go1.14

Have you tried reproducing the issue with the latest release?

Yes

What is the hardware spec (RAM, OS)?

CPU: Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz
RAM: 16GB
OS: Ubuntu 18.04.4 LTS

Steps to reproduce the issue (command/config used to run Dgraph).

Mutation:

{
  set {
    <1> <name> "Michonne" .
    <24> <name> "Glenn Rhee" .
    <31> <name> "Andrea" .
    <1000> <name> "Alice" .
    <1001> <name> "Bob" .
    <1002> <name> "Matt" .
    <1003> <name> "John" .
    <1005> <name> "Tim" .
    <1006> <name> "Horton" .
    <1007> <name> "Oliver" .

    <1> <path> <31>  .
    <1> <path> <24>  .
    <31> <path> <1000> .
    <1000> <path> <1001> .
    <1000> <path> <1002> .
    <1001> <path> <1002> .
    <1002> <path> <1003> .
    <1001> <path> <1003> .
    <1003> <path> <1001> .
    <1002> <path> <1005> .
    <1005> <path> <1006> .
    <1006> <path> <1007> .
  }
}

Query:

{
A as shortest(from: 1, to:1002, numpaths: 3) {
	path
        }

me(func: uid( A)) {
	name
        }
}

Expected behaviour and actual result.

IMO expected behavior should be to return only two paths. 1-31-1000-1002 and 1-31-1000-1001-1002.
Actual result:
1-31-1000-1002, 1-31-1000-1001-1002 and 1-31-1000-1002-1003-1001-1002.

@OmarAyo OmarAyo added the area/querylang/algos Related to graph algorithms, such as k-shortest path. label May 12, 2020
@all-seeing-code all-seeing-code self-assigned this May 12, 2020
@lgalatin lgalatin added the status/accepted We accept to investigate/work on it. label May 12, 2020
@lgalatin
Copy link
Contributor

lgalatin commented May 15, 2020

Fixed in #5410

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/querylang/algos Related to graph algorithms, such as k-shortest path. status/accepted We accept to investigate/work on it.
Development

No branches or pull requests

3 participants