Re: JanusGraph database cache on distributed setup
Boxuan Li
Thanks Marc for making it clear.
toggle quoted message
Show quoted text
@Wasantha, how did you implement your void invalidate(StaticBuffer key, List<CachableStaticBuffer> entries) method? Make sure you evict this key from your Redis cache. The default implementation in JanusGraph does not evict it immediately. Rather, it records this key in a local HashMap called expiredKeys and evicts the entry after a timeout. If you use this approach, and you don’t store expiredKeys on Redis, then your other instance could still read stale data. I personally think the usage of expiredKeys is not necessary in your case - you could simply evict the entry from Redis in the invalidate call. If you still have a problem, probably a better way is to share your code so that we could take a look at your implementation. Best, Boxuan
|
|