JanusGraph / JanusGraph/janusgraph
Use Caffeine cache features to improve invalidation of ExpirationKCVSCache
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 5.8k
- Forks
- 1.2k
- Avg merge
- 13h 53m
- Merged PRs (30d)
- 6
Description
This is a follow-up issue to #871 and #3198.
Current `ExpirationKCVSCache` has it's own Cleanup thread which cleanups (invalidates) the cache using probabilistic approach with a fixed probability of 1 to 1000.
As a minimum we could use direct Caffeine features for such periodic invalidation as noted [here](https://github.com/JanusGraph/janusgraph/pull/3198#issuecomment-1233704326).
That said, I would also recommend checking the current invalidation complexity of Caffeine cache. If it's small enough - we might benefit from removing probabilistic invalidation all together and call `.invalidate` directly. My thoughts on it are described [here](https://github.com/JanusGraph/janusgraph/pull/3198#issuecomment-1234012307).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading ExpirationKCVSCache and its cleanup thread, then review the related discussions in issues #871 and #3198. Compare Caffeine's periodic invalidation with direct invalidate calls and determine the acceptable approach; done means the invalidation design is agreed and the existing probabilistic cleanup behavior is appropriately replaced or retained.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- databases
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100