-
Notifications
You must be signed in to change notification settings - Fork 526
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
feat(core): support batch+parallel edges traverse #2312
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2312 +/- ##
============================================
- Coverage 68.26% 68.04% -0.23%
+ Complexity 989 981 -8
============================================
Files 500 501 +1
Lines 41516 41662 +146
Branches 5786 5796 +10
============================================
+ Hits 28342 28350 +8
- Misses 10415 10556 +141
+ Partials 2759 2756 -3
... and 17 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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.
Nice enhance
hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/OltpTraverser.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/OltpTraverser.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/OltpTraverser.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/OltpTraverser.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/OltpTraverser.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/OltpTraverser.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/OltpTraverser.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/OltpTraverser.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/OltpTraverser.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/EdgesQueryIterator.java
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/task/TaskManager.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/task/TaskManager.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/OltpTraverser.java
Outdated
Show resolved
Hide resolved
@@ -43,55 +43,55 @@ public final class Consumers<V> { | |||
public static final int THREADS = 4 + CoreOptions.CPUS / 4; | |||
public static final int QUEUE_WORKER_SIZE = 1000; | |||
public static final long CONSUMER_WAKE_PERIOD = 1; | |||
private static final Object QUEUE_END = new VWrapper(null); |
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.
can we remove VWrapper class and just use new Object()
instead
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.
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.
get it, can we remove VWrapper class and keep BlockingQueue<V> queue
, then try to define V QUEUE_END = (V) new Object();
hugegraph-core/src/main/java/org/apache/hugegraph/util/Consumers.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/OltpTraverser.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/OltpTraverser.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/OltpTraverser.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/OltpTraverser.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/util/Consumers.java
Outdated
Show resolved
Hide resolved
could use ldbc data to perf it (u could the instruction in ldbc-feishu-doc) |
hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBStore.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/task/TaskManager.java
Outdated
Show resolved
Hide resolved
@@ -43,55 +43,55 @@ public final class Consumers<V> { | |||
public static final int THREADS = 4 + CoreOptions.CPUS / 4; | |||
public static final int QUEUE_WORKER_SIZE = 1000; | |||
public static final long CONSUMER_WAKE_PERIOD = 1; | |||
private static final Object QUEUE_END = new VWrapper(null); |
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.
get it, can we remove VWrapper class and keep BlockingQueue<V> queue
, then try to define V QUEUE_END = (V) new Object();
hugegraph-core/src/main/java/org/apache/hugegraph/backend/query/EdgesQueryIterator.java
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/HugeTraverser.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/HugeTraverser.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/OltpTraverser.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/OltpTraverser.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/util/Consumers.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/HugeTraverser.java
Outdated
Show resolved
Hide resolved
hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/OltpTraverser.java
Outdated
Show resolved
Hide resolved
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
- Enhance Consumers.java, supporting ExceptionHandle and `Future` to handle InterruptedException when awaiting - Add Nested Iterator Edge and support batch execution - Support batch execution & thread parallel in KoutTraverser and Kneighbor
- Enhance Consumers.java, supporting ExceptionHandle and `Future` to handle InterruptedException when awaiting - Add Nested Iterator Edge and support batch execution - Support batch execution & thread parallel in KoutTraverser and Kneighbor
Purpose of the PR
Main Changes
Future
to handle InterruptedException when awaitingVerifying these changes
Initialize the Graph
Add LOG in consumer
Postman Test & Check Log
Does this PR potentially affect the following parts?
Documentation Status
Doc - TODO
Doc - Done
Doc - No Need