cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ard Schrijvers" <>
Subject RE: [jira] Created: (COCOON-1885) The EHDefaultStore returns in the size() method the wrong number of keys
Date Tue, 25 Jul 2006 11:35:11 GMT
This is a partial fix of a larger problem that I am not yet capable of fixing: removing cachekeys
according the correct eviction policy. 

This fix at least fixes the flaw, that the StoreJanitor could delete the entire memoryStore
part from ehcache. In the JCSDefaultStore, this size() method was already correct. I just
noticed, that JCSDefaultStore is not in the cocoon trunk anymore. Is there specific reason
for it? Did it move?

Regards Ard Schrijvers

> The EHDefaultStore returns in the size() method the wrong 
> number of keys
> --------------------------------------------------------------
> ----------
>                  Key: COCOON-1885
>                  URL:
>              Project: Cocoon
>           Issue Type: Bug
>           Components: * Cocoon Core
>     Affects Versions: 2.1.9
>             Reporter: Ard Schrijvers
>             Priority: Critical
> The excalibut store interface defines a size() method for a store: 
> /**
>      * Returns count of the objects in the store, or -1 if 
> could not be
>      * obtained.
>      */
> int size();
> What it not explicitely says, is that it is the number of 
> keys in memoryStore (so not the diskStore) is needed. The 
> StoreJanitor uses this size() to free some memory from cache 
> when the JVM is low on memory. Since the current 
> EHDefaultStore returns with size() ALL cachekeys 
> (memoryStoreSize + diskStoreSize), it is quite likely when 
> having a large cache that the StoreJanitor removes all 
> cachekeys in memoryStore. Simply changing the size() method 
> of EHDefaultStore to return the number of keys in memoryStore 
> is sufficient.  The JCSDefaultStore did implement it 
> correctly already (though I do not see it in the cocoon trunk 
> anymore..?)
> -- 
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the 
> administrators:
For more information on JIRA, see:

View raw message