-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Correct/go back trace overlap #2203
Conversation
…rrect/go-back-trace-overlap
There was a problem hiding this 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.
src/graph/GoExecutor.cpp
Outdated
@@ -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 |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
// 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; |
There was a problem hiding this comment.
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.
Yes. we should. |
In progress. |
… src in current step.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
* 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>
* 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>
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