-
-
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
Revamp JanusGraphMultiQueryStrategy for better parent step usage [cql-tests] [tp-tests] #3783
Revamp JanusGraphMultiQueryStrategy for better parent step usage [cql-tests] [tp-tests] #3783
Conversation
17b3485
to
464f027
Compare
e73a570
to
052cfa7
Compare
Benchmark tests in this comment are now outdated due to CQL storage improvements and new development iterations in this PR. Please, see the new benchmark tests in the following comment. Executed added benchmarks both for this PR and for Master branch:
This PR:
There were no performance difference for tests:
Conclusion: As this PR adds support to a number of new parent steps, it's expected that new parent steps will gain better performance in multi-query cases. As |
d4688a8
to
42fd43d
Compare
243f328
to
ccec0b8
Compare
I made another development iteration and improved multi-nested repeat steps usage for some cases (added 3 different modes of running multi-nested The new benchmarks are below. Master branch:
Current branch:
Performance improvements are reflected here:
Please, in case anyone has enough capacity and would like to review this PR (or just have any concerns / comments / suggestions without committing for the full review), leave a commit in this PR until the start of the next week. cc @JanusGraph/committers |
ccec0b8
to
7f21c5a
Compare
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.
Impressive work, not only on the implementation itself, including the benchmarks, but also on the documentation!
I have only reviewed the documentation as I won't have enough time to review the code changes here. My comments are mostly about stylistic issues.
7f21c5a
to
234bf71
Compare
…-tests] [tp-tests] This commit improves JanusGraphMultiQueryStrategy to better support multi-query compatible parent steps. 1. This commit brings better support for `repeat` step by introducing next itaration registration process. Previously `repeat` children steps was getting traversers registered from the beginning of all outer repeat steps which could result in duplicate or unnecesary retrievals for the first batch. Moreover, next iterations were not considered. This commit changes the approach to bring different `repeat` step modes which can change the batches registration behaviour to aacount only the closest `repeat` step, all `repeat` steps, all only starts of all `repeat` steps. 2. This commit adds support to almost all known TinkerPop Parent steps. The exception is `match` step. We didn't have proper outter start registration for `match` step previously and now as well. Fixes JanusGraph#3733 Fixes JanusGraph#3735 Fixes JanusGraph#2996 Signed-off-by: Oleksandr Porunov <[email protected]>
234bf71
to
89f5611
Compare
Thank you @FlorianHockmann ! I agree with all your comments and applied the changes you suggested. |
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 and it makes sense to address the Changelog in a follow-up issue.
This commit improves JanusGraphMultiQueryStrategy to better support multi-query compatible parent steps.
This commit brings better support for
repeat
step by introducing next itaration registration process.Previously
repeat
children steps was getting traversers registered from the beginning of all outer repeat steps whichcould result in duplicate or unnecesary retrievals for the first batch. Moreover, next iterations were not considered.
This commit changes the approach to bring different
repeat
step modes which can change the batches registration behaviourto aacount only the closest
repeat
step, allrepeat
steps, all only starts of allrepeat
steps.This commit adds support to almost all known TinkerPop Parent steps.
The exception is
match
step. We didn't have proper outter start registration formatch
step previously and now as well.To not introduce a behavior change in multi-nested
repeat
steps the configuration optionquery.batch.repeat-step-mode
is added with 3 modes available (closest_repeat_parent
- mode which takes the closestrepeat
parent into account only,starts_only_of_all_repeat_parents
- mode which takes allrepeat
parent steps but only starts into account (previous behavior),all_repeat_parents
- same asstarts_only_of_all_repeat_parents
but takesrepeat
ends into account as well (new default behavior)).The previous approach of inserting and finding multiQuery steps were split on 2 phases:
Current approach is:
See performance improvement in this PR here.
Fixes #3733
Fixes #3735
Fixes #2996
Thank you for contributing to JanusGraph!
In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:
For all changes:
master
)?For code changes:
For documentation related changes: