janusgraph
janusgraph copied to clipboard
Global db-cache invalidation on mutation
Partially discussed in Invalidation
topic here: https://lists.lfaidata.foundation/g/janusgraph-dev/topic/discussion_janusgraph/93326202
Currently we invalidate db-cache only in the next 3 scenarios:
- Enough time passed (
cache.db-cache-time
). - Evicted due to cache size limitation (
cache.db-cache-time
). - Evicted on current JanusGraph instance only due to being mutated on the current JanusGraph instance.
I would propose adding a feature which adds a possibility to evict JanusGraph cache on all JanusGraph instances during mutation on any of the instances (something like cache.db-cache-global-eviction = true
).
This would be a good feature for situations when there are no many writes but many reads. Of course, if there are too many writes this would pressure other JanusGraph nodes which isn't good but then this feature shouldn't be used in such use-cases.
I didn't think on how to implement this feature but I guess maybe reusing JanusGraph messaging mechanism could be a good start.