Skip to content

refact(server): Edge Cache Data Precise Invalidation#2730

Closed
haohao0103 wants to merge 2 commits intoapache:masterfrom
haohao0103:alan-edgecache-precise-invalidation
Closed

refact(server): Edge Cache Data Precise Invalidation#2730
haohao0103 wants to merge 2 commits intoapache:masterfrom
haohao0103:alan-edgecache-precise-invalidation

Conversation

@haohao0103
Copy link
Contributor

@haohao0103 haohao0103 commented Feb 13, 2025

close #2731

@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. tests Add or improve test cases labels Feb 13, 2025
@imbajin imbajin requested a review from javeme February 13, 2025 11:29
@github-actions
Copy link

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

@imbajin imbajin requested a review from Copilot March 30, 2025 10:22
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-actions github-actions bot closed this Sep 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

inactive size:XL This PR changes 500-999 lines, ignoring generated files. tests Add or improve test cases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Improvement] Graph server edgeCache invalidate strategy

2 participants