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

Correct/go back trace overlap #2203

Merged
merged 6 commits into from
Jul 7, 2020
Merged

Correct/go back trace overlap #2203

merged 6 commits into from
Jul 7, 2020

Conversation

Shylock-Hg
Copy link
Contributor

@Shylock-Hg Shylock-Hg commented Jul 3, 2020

What changes were proposed in this pull request?

Why are the changes needed?

Does this PR introduce any user-facing change?

Will affect the GO query over >1 steps and join the previous input.

How was this patch tested?

Checklist

  • I've run the tests to see all new and existing tests pass
  • If this Pull Request resolves an issue, I linked to the issue in the text above
  • I've informed the technical writer about the documentation change if necessary

@Shylock-Hg Shylock-Hg added in progress type/bug Type: something is unexpected ready-for-testing PR: ready for the CI test and removed in progress labels Jul 3, 2020
@jude-zhu jude-zhu requested review from dutor and monadbobo July 6, 2020 08:54
Copy link
Contributor

@CPWstatic CPWstatic left a comment

Choose a reason for hiding this comment

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

Would you please add some new test cases to cover the error scenario.

@@ -662,6 +660,47 @@ std::vector<VertexID> GoExecutor::getDstIdsFromResps(std::vector<RpcResponse>::i
return std::vector<VertexID>(set.begin(), set.end());
}

std::vector<VertexID> GoExecutor::getDstIdsFromRespWithBackTrack(const RpcResponse &rpcResp) const {
// back trace in current step
// To avoid overlap in on step edges
Copy link
Contributor

Choose a reason for hiding this comment

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

What do you mean by in on step edges?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

in current step

// 6 , 1
// 7 , 6
// Will mistake lead to 7->6 if insert one by one
// So read all roots of current step first , then insert them
Copy link
Contributor

Choose a reason for hiding this comment

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

Emm, i'd really appreciate that you could make these comments much more clear if you want the reader to understand what you want to fix.

Comment on lines 1115 to 1124
// Here if join the input we extend the input rows coresponding to current vertex;
// Or just loop once as previous that not join anything,
// in fact result what in responses.
bool notJoinOnce = false;
for (auto inputRow = inputRows.first;
!joinInput || inputRow != inputRows.second;
joinInput ? ++inputRow : inputRow) {
for (auto inputRow = inputRows.begin();
!joinInput || inputRow != inputRows.end();
joinInput ? ++inputRow : inputRow) {
if (!joinInput) {
if (notJoinOnce) {
break;
Copy link
Contributor

Choose a reason for hiding this comment

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

I still want to tell you that it's too complicated here.

@jude-zhu jude-zhu requested a review from CPWstatic July 7, 2020 03:15
@dutor
Copy link
Contributor

dutor commented Jul 7, 2020

Would you please add some new test cases to cover the error scenario.

Yes. we should.

@Shylock-Hg
Copy link
Contributor Author

Would you please add some new test cases to cover the error scenario.

Yes. we should.

In progress.

Copy link
Contributor

@dutor dutor left a comment

Choose a reason for hiding this comment

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

LGTM.

@dutor dutor merged commit 3132e39 into vesoft-inc:master Jul 7, 2020
xuguruogu pushed a commit to xuguruogu/nebula that referenced this pull request Aug 5, 2020
* Fix the go back trace overlap.

* Fix some typo. And unnecessary copy by reference.

* Fix the note comment.

* Add a case to cover the issue that back tracker will overlap the dst, src in current step.

Co-authored-by: jude-zhu <51590253+jude-zhu@users.noreply.github.com>
tong-hao pushed a commit to tong-hao/nebula that referenced this pull request Jun 1, 2021
* Fix the go back trace overlap.

* Fix some typo. And unnecessary copy by reference.

* Fix the note comment.

* Add a case to cover the issue that back tracker will overlap the dst, src in current step.

Co-authored-by: jude-zhu <51590253+jude-zhu@users.noreply.github.com>
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 type/bug Type: something is unexpected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants