dgraph-io / dgraph-io/dgraph

k shortest path does not return the shortest path when using MaxFrontierSize

Open
#9,577 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Stale
Dominant language
Go
Stars
21.8k
Forks
1.6k
Avg merge
2d 5h
Merged PRs (30d)
9

Description

Describe the bug

In https://github.com/dgraph-io/dgraph/issues/9333 a new Feature got introduced called MaxFrontierSize, which limits memory usage in case of high density graphs. This causes a algorithmic issue, because the "best" node is droped from the priority queue when the MaxFrontierSize is triggered.
This causes a nearly 100% to not get the shortest path ever.

To Reproduce

Steps to reproduce the behavior:

  1. run shortest path query with numpath = 1 to get the shortest path
  2. run the same query with numpath > 1 with MaxFrontierSize low enough to get triggered on your data set
  3. Compare Paths

Expected behavior

numpaths > 1 should return the somewhat shortest paths, possibly even the correct shortest paths

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or test is named in the issue. Start by locating the shortest-path implementation and the MaxFrontierSize handling, then reproduce the comparison with numpath=1 and numpath>1 using a low frontier limit. Done means the multi-path query returns the shortest path, or the expected near-shortest behavior, without the best node being improperly discarded.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.