-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 possibility to manual db-cache invalidation #3184
Add possibility to manual db-cache invalidation #3184
Conversation
d462ea0
to
432075f
Compare
...h-core/src/main/java/org/janusgraph/graphdb/database/cache/KCVSCacheInvalidationService.java
Show resolved
Hide resolved
432075f
to
011160e
Compare
@li-boxuan changed the interface, excluded that previously added section from JanusGraph doc, covered new methods with integration tests ( |
8d4cdbf
to
87d1778
Compare
...graph-core/src/main/java/org/janusgraph/graphdb/database/cache/CacheInvalidationService.java
Outdated
Show resolved
Hide resolved
87d1778
to
9e77576
Compare
clearExpiredCache(false); | ||
} | ||
|
||
private synchronized void clearExpiredCache(boolean withNewPenaltyCountdown) { |
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.
@porunov Do you know why we don't clear expired keys right away? I am not sure if I understand why we need to clean them using a dedicated thread.
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.
Nvm I saw your reply here: #3198 (comment) I guess we would create a follow-up issue for this?
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.
Yeah, I think we will need to open follow-up PRs for direct invalidation without having expire functionality at all, but I didn't check the complexity of such operations yet
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.
@li-boxuan I created a follow-up issue regarding cache here: #3218
Related to JanusGraph#3155 Signed-off-by: Oleksandr Porunov <[email protected]>
9e77576
to
64c6239
Compare
@li-boxuan would you like to re-review this PR or is it OK to proceed with the lazy consensus? |
@porunov Sorry I don't have much bandwidth recently. I've reviewed it once before anyways, so I am OK to proceed with the lazy consensus. |
Okay, I think it's safe to proceed with the lazy consensus because this PR adds new functionality and doesn't change logic of existing functionality. |
This PR adds possibility to manually expire / invalidate db-cache entries.
Related to #3155
Signed-off-by: Oleksandr Porunov [email protected]
Thank you for contributing to JanusGraph!
In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:
For all changes:
master
)?For code changes:
For documentation related changes: