janusgraph icon indicating copy to clipboard operation
janusgraph copied to clipboard

Global db-cache invalidation on mutation

Open porunov opened this issue 2 years ago • 0 comments

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:

  1. Enough time passed (cache.db-cache-time).
  2. Evicted due to cache size limitation (cache.db-cache-time).
  3. 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.

porunov avatar Jul 25 '22 23:07 porunov