-
1. Re: Hibernate L2 Invalidation Cache and GC
galder.zamarreno Jan 17, 2019 10:32 AM (in response to thammoud)1 of 1 people found this helpfulGood test. I'd suggest you upgrade to latest WildFly version where you can configure Infinispan caches with conflict management and merge policies.
In this case, you'd want that entity caches to be configured with MergePolicy REMOVE_ALL. e.g.
<invalidation-cache name="entity">
<transaction mode="NON_XA"/>
<object-memory size="10000"/>
<expiration max-idle="100000"/>
<partition-handling when-split="ALLOW_READ_WRITES" merge-policy="REMOVE_ALL"/>
</invalidation-cache>
(WildFly 15 comes with Infinispan 9.4.x)
We should have this configured out of the box. ryanemerson ?
-
2. Re: Hibernate L2 Invalidation Cache and GC
ryanemerson Jan 17, 2019 10:57 AM (in response to galder.zamarreno)1 of 1 people found this helpfulthammoud Hi, we actually conducted some very similar tests to yours when developing Infinispan 9.x and unfortunately, we discovered that the scenario that you described was not correctly handled. This has been fixed since 9.2.x, so I suggest that you upgrade to Wildfly 15 like galderz recommends.
Also, please note that it's not possible to define a conflict merge policy with invalidation mode, however the default behaviour is for all entries on the rejoining node to be wiped in ^ scenario.
-
3. Re: Hibernate L2 Invalidation Cache and GC
thammoud Jan 17, 2019 3:27 PM (in response to thammoud)Thank you Ryan and Galder. Truly appreciate the help.