Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 95319 invoked from network); 26 Jul 2006 05:09:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 26 Jul 2006 05:09:38 -0000 Received: (qmail 15134 invoked by uid 500); 26 Jul 2006 05:09:36 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 15068 invoked by uid 500); 26 Jul 2006 05:09:36 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@cocoon.apache.org List-Id: Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 15057 invoked by uid 99); 26 Jul 2006 05:09:36 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Jul 2006 22:09:36 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Jul 2006 22:09:36 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 5985F714294 for ; Wed, 26 Jul 2006 05:07:15 +0000 (GMT) Message-ID: <12711782.1153890435363.JavaMail.jira@brutus> Date: Tue, 25 Jul 2006 22:07:15 -0700 (PDT) From: "Antonio Gallardo (JIRA)" To: dev@cocoon.apache.org Subject: [jira] Closed: (COCOON-1885) The EHDefaultStore returns in the size() method the wrong number of keys In-Reply-To: <13766754.1153826775359.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ 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