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

Early leave findshortestpath loop optimization #4672

Merged
merged 7 commits into from
Sep 28, 2022

Conversation

casualwind
Copy link
Contributor

@casualwind casualwind commented Sep 22, 2022

Add a condition in the loop planner to judge whether there is any
independent subgraph of the vids. If it is true, then the loop ends.

What type of PR is this?

  • [yes] bug
  • feature
  • enhancement

What problem(s) does this PR solve?

Issue(s) number:

close #4634

Description:

Early leave findshortestpath if the leftvid or the rightvid in a complete divided subgraph without the other one.
Early leave findshortestpath if one the destination vid or start vid doesnot exist.

How do you solve it?

Judge whether newer vids are added in the leftInputVar or the rightInputVar.
add the additional condition in the loop condition.

Special notes for your reviewer, ex. impact of this fix, design document, etc:

Checklist:

Tests:

  • Unit test(positive and negative cases)
  • Function test
  • Performance test
  • N/A

Affects:

  • Documentation affected (Please add the label if documentation needs to be modified.)
  • Incompatibility (If it breaks the compatibility, please describe it and add the label.)
  • If it's needed to cherry-pick (If cherry-pick to some branches is required, please label the destination version(s).)
  • Performance impacted: Consumes more CPU/Memory

Release notes:

Please confirm whether to be reflected in release notes and how to describe:

ex. Fixed the bug .....

    Add a condition in the loop planner to judge whether there is any
    independent subgraph of the vids. If it is true, then the loop ends.
@CLAassistant
Copy link

CLAassistant commented Sep 22, 2022

CLA assistant check
All committers have signed the CLA.

@Sophie-Xie
Copy link
Contributor

@casualwind Thanks for contribution! pls sign the CLA and fix the fail of CI :)

@casualwind
Copy link
Contributor Author

I have signed the CLA and fix the fail of CI

@casualwind
Copy link
Contributor Author

@nevermore3 Do you have any time to take a look at this pr? is this blocked by the #4678? is there anything need me to follow up? Thank you.

Copy link
Contributor

@nevermore3 nevermore3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for your contribution

@Sophie-Xie Sophie-Xie merged commit 200339b into vesoft-inc:master Sep 28, 2022
@casualwind casualwind deleted the fsp branch October 19, 2022 02:52
@casualwind casualwind restored the fsp branch November 15, 2022 05:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-testing PR: ready for the CI test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Redundant work of finding shortest path when one vid does not exist
6 participants