-
Notifications
You must be signed in to change notification settings - Fork 0
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
add Traverser Http Query comment #9
base: master
Are you sure you want to change the base?
Conversation
WalkthroughThe recent changes primarily involve the addition of comments in various parts of the HugeGraph codebase. These comments are intended to aid in understanding the logic and performance impacts of specific segments of the code. Notably, they cover while loops, method execution times, and batch query functionalities across multiple files, without altering the core functionalities. Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/HugeTraverser.java (1 hunks)
- hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/KneighborTraverser.java (1 hunks)
- hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/OltpTraverser.java (1 hunks)
Files skipped from review due to trivial changes (3)
- hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/HugeTraverser.java
- hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/KneighborTraverser.java
- hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/OltpTraverser.java
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.
Actionable comments posted: 1
Outside diff range, codebase verification and nitpick comments (1)
hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/KneighborAPI.java (1)
180-181
: Consider adding more context or examples in the comment.While the comment is helpful, it might be more beneficial to include specific examples or more detailed explanations of how batch requests can impact performance. This could help developers make more informed decisions when using this API.
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (7)
- hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/KneighborAPI.java (1 hunks)
- hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/serializer/JsonSerializer.java (1 hunks)
- hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/backend/tx/GraphTransaction.java (1 hunks)
- hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/HugeTraverser.java (1 hunks)
- hugegraph-server/hugegraph-hbase/src/main/java/org/apache/hugegraph/backend/store/hbase/HbaseSessions.java (1 hunks)
- hugegraph-server/hugegraph-hbase/src/main/java/org/apache/hugegraph/backend/store/hbase/HbaseTable.java (1 hunks)
- hugegraph-server/hugegraph-hstore/src/main/java/org/apache/hugegraph/backend/store/hstore/HstoreTable.java (1 hunks)
Files skipped from review due to trivial changes (1)
- hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/serializer/JsonSerializer.java
Files skipped from review as they are similar to previous changes (1)
- hugegraph-server/hugegraph-core/src/main/java/org/apache/hugegraph/traversal/algorithm/HugeTraverser.java
Additional comments not posted (5)
hugegraph-server/hugegraph-api/src/main/java/org/apache/hugegraph/api/traversers/KneighborAPI.java (2)
180-181
: Review the added comment for clarity and accuracy.The added comment explains a potential performance impact when
withVertex
is true due to batch requests in backends like HBase or HStore. This is a valuable addition for developers to understand the implications of their query parameters.
180-181
: Verify the implementation of batch requests in the backend.Given the comment about batch requests, it's crucial to ensure that the backend implementations (HBase, HStore) are correctly handling these requests to avoid potential performance issues.
hugegraph-server/hugegraph-hbase/src/main/java/org/apache/hugegraph/backend/store/hbase/HbaseTable.java (1)
200-200
: Batch Query ImplementationThe comment added here explains the support for batch querying by multiple IDs, which is a significant enhancement for performance when dealing with large datasets.
hugegraph-server/hugegraph-hstore/src/main/java/org/apache/hugegraph/backend/store/hstore/HstoreTable.java (1)
440-440
: Clarification on Batch QueryingThe comment added in Chinese clarifies that Hstore also implements batch querying. This is a useful annotation for developers maintaining or extending this code, especially for those familiar with Chinese.
hugegraph-server/hugegraph-hbase/src/main/java/org/apache/hugegraph/backend/store/hbase/HbaseSessions.java (1)
728-728
: Explanation of Bulk Query ExecutionThe comment added here explains that HBase directly handles batch queries, which is a crucial detail for understanding how the system manages bulk data operations efficiently.
@@ -794,7 +794,7 @@ protected Iterator<Vertex> queryVerticesByIds(Object[] vertexIds, | |||
vertices.put(vertex.id(), vertex); | |||
} else { | |||
// Prepare to query from backend store | |||
query.query(id); | |||
query.query(id);//暂时存储到list 应该支持并发查询 |
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.
Review Added Comment for Clarity and Actionability
The comment added in the queryVerticesByIds
method suggests using a list for temporary storage and hints at supporting concurrent queries. While the intent to guide future optimizations is clear, it would be beneficial to provide more detailed suggestions or examples on how to implement these optimizations effectively.
Consider enhancing the comment to include specific techniques or code snippets that could be used to achieve concurrency, which aligns with the PR's objectives of optimizing performance.
Due to the lack of activity, the current pr is marked as stale and will be closed after 180 days, any update will remove the stale label |
主要是跟读 Http Traiverser 相关算法实现及问题优化
已知问题
1. Kneighbor POST API 新版本性能差 待定位根因并解决
2. 计算层如何优化算子性能:并发 or 批量?如何代码实现
Summary by CodeRabbit