You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by "Ard Schrijvers (JIRA)" <ji...@apache.org> on 2006/07/25 13:26:15 UTC
[jira] Created: (COCOON-1885) The EHDefaultStore returns in the
size() method the wrong number of keys
The EHDefaultStore returns in the size() method the wrong number of keys
------------------------------------------------------------------------
Key: COCOON-1885
URL: http://issues.apache.org/jira/browse/COCOON-1885
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: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (COCOON-1885) The EHDefaultStore returns in the
size() method the wrong number of keys
Posted by "Ard Schrijvers (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/COCOON-1885?page=all ]
Ard Schrijvers updated COCOON-1885:
-----------------------------------
Attachment: EHDefaultStore.patch
Fix for EHDefaultStore returning wrong number in the size() method
> The EHDefaultStore returns in the size() method the wrong number of keys
> ------------------------------------------------------------------------
>
> Key: COCOON-1885
> URL: http://issues.apache.org/jira/browse/COCOON-1885
> Project: Cocoon
> Issue Type: Bug
> Components: * Cocoon Core
> Affects Versions: 2.1.9
> Reporter: Ard Schrijvers
> Priority: Critical
> Attachments: EHDefaultStore.patch
>
>
> 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: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Assigned: (COCOON-1885) The EHDefaultStore returns in the
size() method the wrong number of keys
Posted by "Antonio Gallardo (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/COCOON-1885?page=all ]
Antonio Gallardo reassigned COCOON-1885:
----------------------------------------
Assignee: Antonio Gallardo
> The EHDefaultStore returns in the size() method the wrong number of keys
> ------------------------------------------------------------------------
>
> Key: COCOON-1885
> URL: http://issues.apache.org/jira/browse/COCOON-1885
> Project: Cocoon
> Issue Type: Bug
> Components: * Cocoon Core
> Affects Versions: 2.1.9
> Reporter: Ard Schrijvers
> Assigned To: Antonio Gallardo
> Priority: Critical
> Attachments: EHDefaultStore.patch
>
>
> 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: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Closed: (COCOON-1885) The EHDefaultStore returns in the
size() method the wrong number of keys
Posted by "Antonio Gallardo (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/COCOON-1885?page=all ]
Antonio Gallardo closed COCOON-1885.
------------------------------------
Fix Version/s: 2.2-dev (Current SVN)
2.1.10-dev (current SVN)
Resolution: Fixed
Thanks for the patch. It was applied with minor changes. Feel free to reopen the issue if needed.
> The EHDefaultStore returns in the size() method the wrong number of keys
> ------------------------------------------------------------------------
>
> Key: COCOON-1885
> URL: http://issues.apache.org/jira/browse/COCOON-1885
> Project: Cocoon
> Issue Type: Bug
> Components: * Cocoon Core
> Affects Versions: 2.1.9
> Reporter: Ard Schrijvers
> Assigned To: Antonio Gallardo
> Priority: Critical
> Fix For: 2.2-dev (Current SVN), 2.1.10-dev (current SVN)
>
> Attachments: EHDefaultStore.patch
>
>
> 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: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira