Return-Path: X-Original-To: apmail-openjpa-dev-archive@www.apache.org Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9823510C9D for ; Fri, 14 Feb 2014 16:44:27 +0000 (UTC) Received: (qmail 76026 invoked by uid 500); 14 Feb 2014 16:44:25 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 75969 invoked by uid 500); 14 Feb 2014 16:44:24 -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 75922 invoked by uid 99); 14 Feb 2014 16:44:23 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Feb 2014 16:44:23 +0000 Date: Fri, 14 Feb 2014 16:44:23 +0000 (UTC) From: "Rick Curtis (JIRA)" To: dev@openjpa.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (OPENJPA-2285) L2 cache doesn't store FK(s) back into the cache when lazy loading data. 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-2285?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Rick Curtis updated OPENJPA-2285: --------------------------------- Attachment: OPENJPA-2285.test.patch Attaching a testcase that is similar to the 'internal test' that was failing. > L2 cache doesn't store FK(s) back into the cache when lazy loading data. > ------------------------------------------------------------------------ > > Key: OPENJPA-2285 > URL: https://issues.apache.org/jira/browse/OPENJPA-2285 > Project: OpenJPA > Issue Type: Bug > Components: datacache, performance > Affects Versions: 2.0.1, 2.1.1, 2.2.0, 2.3.0 > Reporter: Rick Curtis > Assignee: Rick Curtis > Attachments: OPENJPA-2285.test.patch > > > I ran into a performance bug recently where we aren't caching data, but we could be. The data that we aren't caching is when lazy loading an unowned relationship . > For instance, if we have the model Person <-> Address(LAZY, owner) and we find Person, that data will get stored in the cache. Since Address owns the relationship, we don't have the FK to cache(yet). Later we go to lazily load the address and we need to issue a joined query to find the Address which corresponds to our Person. Once that data has been loaded, we don't store the FK back into the cache. > With this JIRA I'm going to introduce a change that will make our runtime re-cache the Person data when additional data is loaded. -- This message was sent by Atlassian JIRA (v6.1.5#6160)