Search code examples
ignitegridgain

Apache ignite eviction for colocated entries


We have four types of caches and they are colocate based on the relation. Also, it is configured to keep everything in memory without native persistence.

Now we are planning to enable the eviction policy for all caches by configuring default data region with initial size, max size, and eviction mode with Random2Lru.

When the eviction happens from colocated caches, will ignite evict from single cache or its related entries also be evicted?

How does the eviction happen for colocated entries, because, whenever the eviction happens we need to remove its related entries?


Solution

    When the eviction happens from colocated caches, will ignite evict from single cache or its related entries also be evicted?

    Ignite will evict from a single cache, related entries will not be evicted.

    2.

    How does the eviction happen for colocated entries, because, whenever the eviction happens we need to remove its related entries?

    Collocation does not affect eviction in any way. Eviction works with data pages (not with single entries). Eviction uses only data page update timestamp to decide what data page will be evicted.

    And yes, in this case, you should track related entries manually.