refact(server): Edge Cache Data Precise Invalidation#2730
Closed
haohao0103 wants to merge 2 commits intoapache:masterfrom
Closed
refact(server): Edge Cache Data Precise Invalidation#2730haohao0103 wants to merge 2 commits intoapache:masterfrom
haohao0103 wants to merge 2 commits intoapache:masterfrom
Conversation
|
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 |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors cache-related components to enable more precise invalidation of edge cache data while adding new tests for performance and correctness.
- Added and enhanced tests in VertexToEdgeLookupCacheTest.java to measure performance and validate cache invalidation logic.
- Introduced a new enum constant and method in HugeType.java to handle edge-vertex scenarios.
- Modified cache management and transaction logic in CachedGraphTransaction.java, VertexToEdgeLookupCache.java, and CacheManager.java to support finer invalidation of edge cache entries.
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| hugegraph-test/src/main/java/org/apache/hugegraph/unit/cache/VertexToEdgeLookupCacheTest.java | Added tests for cache invalidation performance and index verification. |
| hugegraph-core/src/main/java/org/apache/hugegraph/type/HugeType.java | Added new enum constant EDGE_VERTEX and corresponding helper method. |
| hugegraph-core/src/main/java/org/apache/hugegraph/backend/tx/GraphTransaction.java | Introduced new helper method for retrieving updated edges in a transaction. |
| hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/VertexToEdgeLookupCache.java | Implemented cache tick cleanup logic and index management improvements. |
| hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/RamCache.java | Overrode traverseKeys method for key iteration. |
| hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/CachedGraphTransaction.java | Updated edge cache invalidation and index update logic. |
| hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/CacheManager.java | Added lookup functionality for VertexToEdgeLookupCache. |
| hugegraph-core/src/main/java/org/apache/hugegraph/backend/cache/Cache.java | Added default traverseKeys method. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
close #2731