-
1. Re: No cache pruning when evicting if expiration is active
vblagojevic Sep 28, 2010 11:34 AM (in response to eboily)Edouard,
I believe what you are experiencing is related to https://jira.jboss.org/browse/ISPN-670
Cheers,
Vladimir
-
2. Re: No cache pruning when evicting if expiration is active
vblagojevic Sep 28, 2010 11:53 AM (in response to vblagojevic)Also, all eviction is done piggyback now while purging is done from a dedicated thread. I hesitated updating docs as this is still somewhat work in progress. As 4.2 nears release docs will be up to date.
Vladimir
-
3. Re: No cache pruning when evicting if expiration is active
eboily Sep 28, 2010 12:10 PM (in response to vblagojevic)Vladimir,
Yes, it is clearly related to https://jira.jboss.org/browse/ISPN-670.
As I understand it, the eviction is to limit the memory usage of the cache, while expiration is more business related, like not keeping objects more than 24 hours or so. Eviction and Expiration have two different objectives.
Considering this, one might want to have both cleaning methods active simultaneously. I may have this 24 hours business requirement but I also have memory limitations. So I strongly agree with your comment (here) stating that:
[...] Starting with Infinispan 4.2 and beyond, 5.0 all container entries regardless of their type are considered as eviction candidates.
However, it doesn't seem to be active in 4.2.0-ALPHA2. When I look at the code of DefaultDataContainer's constructor, I see
// translate eviction policy and strategyswitch (policy) {case PIGGYBACK:case DEFAULT:evictionListener = new DefaultEvictionListener();break;default:throw new IllegalArgumentException("No such eviction thread policy " + strategy);} // translate eviction policy and strategyswitch (policy) {case PIGGYBACK:case DEFAULT:evictionListener = new DefaultEvictionListener();break;default:throw new IllegalArgumentException("No such eviction thread policy " + strategy);}// translate eviction policy and strategyswitch (policy) {case PIGGYBACK:case DEFAULT:evictionListener = new DefaultEvictionListener();break;default:throw new IllegalArgumentException("No such eviction thread policy " + strategy);}(btw, it should be policy, not strategy in the throw above)
Which seems to indicate that PIGGYBACK and POLICY are the same for now.
BTW, the same strategy as LRU also seem to be used for FIFO and UNORDERED.
Eviction eviction;
switch (strategy) {
case FIFO:
case UNORDERED:
case LRU:
eviction = Eviction.LRU;
break;
case LIRS:
eviction = Eviction.LIRS;
break;
default:
throw new IllegalArgumentException("No such eviction strategy " + strategy);
}
So, concerning the PIGGYBACK behavior, is there a quick patch for this?
Thanks for your support Vladimir, it is highly appreciated.
- Edouard
-
4. Re: No cache pruning when evicting if expiration is active
vblagojevic Sep 28, 2010 12:50 PM (in response to eboily)Hey,
The changes and fixes introduced by ISPN-670 are not released yet. They are in version control but not released. They will be in 4.2 Beta and beyond and 5.0 Beta and beyond. 4.2 Beta should be released soon, in matter of a week or two.
Yes, correct, FIFO and UNORDERED are now defaulting to LRU. This is intentional. All eviction is done piggyback style now. I will change the docs to reflect this just prior to release of 4.2. Thnx for the heads up at policy/strategy mixup.
I am not sure which patch are you referring to?
Regards,
Vladimir
-
5. Re: No cache pruning when evicting if expiration is active
eboily Sep 28, 2010 1:18 PM (in response to vblagojevic)OK, great!
I'll wait for the beta release then,
Thanks!
- Edouard