You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Rick Curtis (JIRA)" <ji...@apache.org> on 2014/02/14 17:44:23 UTC

[jira] [Updated] (OPENJPA-2285) L2 cache doesn't store FK(s) back into the cache when lazy loading data.

     [ 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)