From dev-return-16334-apmail-openjpa-dev-archive=openjpa.apache.org@openjpa.apache.org Mon May 03 16:15:17 2010 Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 94245 invoked from network); 3 May 2010 16:15:16 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 3 May 2010 16:15:16 -0000 Received: (qmail 42626 invoked by uid 500); 3 May 2010 16:15:16 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 42606 invoked by uid 500); 3 May 2010 16:15:16 -0000 Mailing-List: contact dev-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openjpa.apache.org Delivered-To: mailing list dev@openjpa.apache.org Received: (qmail 42598 invoked by uid 99); 3 May 2010 16:15:16 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 May 2010 16:15:16 +0000 X-ASF-Spam-Status: No, hits=-1380.3 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 May 2010 16:15:15 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o43GEtef028229 for ; Mon, 3 May 2010 16:14:55 GMT Message-ID: <7577352.15591272903295263.JavaMail.jira@thor> Date: Mon, 3 May 2010 12:14:55 -0400 (EDT) From: "Rick Curtis (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Closed: (OPENJPA-1511) Executing a cached query doesn't properly cache results after DataCache eviction In-Reply-To: <240114056.281511266250887903.JavaMail.jira@brutus.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/OPENJPA-1511?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Rick Curtis closed OPENJPA-1511. -------------------------------- Resolution: Invalid After a few other JIRAs I understand this area of the code much better and I think everything is working as expected. > Executing a cached query doesn't properly cache results after DataCache eviction > -------------------------------------------------------------------------------- > > Key: OPENJPA-1511 > URL: https://issues.apache.org/jira/browse/OPENJPA-1511 > Project: OpenJPA > Issue Type: Bug > Affects Versions: 2.0.0-beta > Reporter: Rick Curtis > Assignee: Ravi P Palacherla > Attachments: TestCache.java > > > When doing some testing I found that the QueryCache sometimes doesn't put results into the DataCache. > I haven't had time to debug the problem, but I'm opening this JIRA so I can attach the test case I've created. > The test scenario is as follows: > String query = "Select t FROM Item t where 1=1 ORDER BY t.id"; > items = em.createQuery(query,Item.class).getResultList(); > assertTrue(storeCache.contains(Item.class, items.get(0).getId())); > // Make sure that all of the results are in the DataCache. > for(Item o : items){ > assertTrue(storeCache.contains(Item.class, o.getId())); > } > storeCache.evict(Item.class,items.get(0).getId()); > // Evict one result > assertFalse(storeCache.contains(Item.class,items.get(0).getId())); > > // Executing the same query should re-populate the datacache > items = em.createQuery(query,Item.class).getResultList(); > assertTrue(storeCache.contains(Item.class, items.get(0).getId())); // fails here -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.