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

fix_shortest_path_crash #4352

Merged
merged 1 commit into from
Jun 24, 2022
Merged

Conversation

nevermore3
Copy link
Contributor

@nevermore3 nevermore3 commented Jun 24, 2022

What type of PR is this?

  • bug
  • feature
  • enhancement

What problem(s) does this PR solve?

Issue(s) number:

Description:

Graph crash when running tck manually
image
Can't be reproduced consistently.
Tck is run with 16 concurrent threads.

How do you solve it?

shared variables are locked before use in multi-threading environment

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 .....

@nevermore3 nevermore3 added this to the v3.2.0 milestone Jun 24, 2022
@nevermore3 nevermore3 added ready-for-testing PR: ready for the CI test type/bug Type: something is unexpected ready for review labels Jun 24, 2022
@@ -86,6 +80,7 @@ class ShortestPathBase {
std::unordered_map<std::string, std::string>* stats_{nullptr};
size_t maxStep_;
bool singleShortest_{true};
folly::SpinLock statsLock_;
Copy link
Contributor

@Shylock-Hg Shylock-Hg Jun 24, 2022

Choose a reason for hiding this comment

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

How about other members?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

other members will not be written by multiple threads at the same time

@@ -264,6 +264,9 @@ folly::Future<bool> SingleShortestPath::buildEvenPath(size_t rowNum,
return false;
}
for (auto& meetVertex : vertices) {
if (!meetVertex.isVertex()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why this isn't vertex?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

vertices may contain EMPTY values ​​in exceptional cases

@Sophie-Xie Sophie-Xie added the cherry-pick-v3.2 PR: need cherry-pick to this version label Jun 24, 2022
@Sophie-Xie Sophie-Xie merged commit b01fdd3 into vesoft-inc:master Jun 24, 2022
@nevermore3 nevermore3 deleted the fix_shortest_path branch June 24, 2022 03:40
Sophie-Xie pushed a commit that referenced this pull request Jun 27, 2022
Sophie-Xie added a commit that referenced this pull request Jun 27, 2022
* force cache the docker layer (#4331)

* check god role exist when meta init (#4330)

* check god role exist when meta init

* return error if kv fail

Co-authored-by: Doodle <[email protected]>

* Fix object pool mtsafe. (#4332)

* Fix object pool mtsafe.

* Fix lock.

* Fixed web service crash (#4334)

Co-authored-by: Sophie <[email protected]>

* Fix get edges transform rule. (#4328)

1. Input/Ouput variables.
2. Keep column names of Limit same with input plan node.

Co-authored-by: Sophie <[email protected]>

* fix rc docker (#4336)

* add lock (#4352)

* fix map concurrency issue (#4344)

* fix mutex in map

* add test

* move the order

Co-authored-by: Sophie <[email protected]>

* add stats under index conditions (#4353)

Co-authored-by: Harris.Chu <[email protected]>
Co-authored-by: jimingquan <[email protected]>
Co-authored-by: Doodle <[email protected]>
Co-authored-by: shylock <[email protected]>
Co-authored-by: dutor <[email protected]>
Co-authored-by: panda-sheep <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick-v3.2 PR: need cherry-pick to this version ready for review ready-for-testing PR: ready for the CI test type/bug Type: something is unexpected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants