You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Albert Lee (JIRA)" <ji...@apache.org> on 2010/06/30 17:29:49 UTC
[jira] Created: (OPENJPA-1713) OutOfMemory caused by
EntityManagerImpl.push/popFetchPlan processing
OutOfMemory caused by EntityManagerImpl.push/popFetchPlan processing
--------------------------------------------------------------------
Key: OPENJPA-1713
URL: https://issues.apache.org/jira/browse/OPENJPA-1713
Project: OpenJPA
Issue Type: Bug
Components: kernel
Affects Versions: 2.0.0, 1.2.2, 1.1.0
Reporter: Albert Lee
Assignee: Albert Lee
Fix For: 2.1.0
There is a leak in memory in the EntityManagerImpl push/popFetchPlan processing where fetch plan associated with the current fetch configuration is add to the _plans IdentityHashMap but never remove from it.
private Map<FetchConfiguration,FetchPlan> _plans = new IdentityHashMap<FetchConfiguration,FetchPlan>(1);
public FetchPlan getFetchPlan() {
assertNotCloseInvoked();
_broker.lock();
try {
FetchConfiguration fc = _broker.getFetchConfiguration();
FetchPlan fp = _plans.get(fc);
if (fp == null) {
fp = _emf.toFetchPlan(_broker, fc);
_plans.put(fc, fp); <<< added to _plans
}
return fp;
} finally {
_broker.unlock();
}
}
public FetchPlan pushFetchPlan() {
assertNotCloseInvoked();
_broker.lock();
try {
_broker.pushFetchConfiguration();
return getFetchPlan();
} finally {
_broker.unlock();
}
}
public void popFetchPlan() {
assertNotCloseInvoked();
_broker.lock();
try {
_broker.popFetchConfiguration(); <<< but never remove when the fetch plan is popped.
} finally {
_broker.unlock();
}
}
The only time _plans is cleaned up are during clear() or closed().
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-1713) OutOfMemory caused by
EntityManagerImpl.push/popFetchPlan processing
Posted by "Michael Dick (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1713?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Dick updated OPENJPA-1713:
----------------------------------
Fix Version/s: 2.0.1
Targeting for 2.0.1.
> OutOfMemory caused by EntityManagerImpl.push/popFetchPlan processing
> --------------------------------------------------------------------
>
> Key: OPENJPA-1713
> URL: https://issues.apache.org/jira/browse/OPENJPA-1713
> Project: OpenJPA
> Issue Type: Bug
> Components: kernel
> Affects Versions: 1.1.0, 1.2.2, 2.0.0
> Reporter: Albert Lee
> Assignee: Albert Lee
> Fix For: 2.0.1, 2.1.0
>
>
> There is a leak in memory in the EntityManagerImpl push/popFetchPlan processing where fetch plan associated with the current fetch configuration is add to the _plans IdentityHashMap but never remove from it.
> private Map<FetchConfiguration,FetchPlan> _plans = new IdentityHashMap<FetchConfiguration,FetchPlan>(1);
> public FetchPlan getFetchPlan() {
> assertNotCloseInvoked();
> _broker.lock();
> try {
> FetchConfiguration fc = _broker.getFetchConfiguration();
> FetchPlan fp = _plans.get(fc);
> if (fp == null) {
> fp = _emf.toFetchPlan(_broker, fc);
> _plans.put(fc, fp); <<< added to _plans
> }
> return fp;
> } finally {
> _broker.unlock();
> }
> }
> public FetchPlan pushFetchPlan() {
> assertNotCloseInvoked();
> _broker.lock();
> try {
> _broker.pushFetchConfiguration();
> return getFetchPlan();
> } finally {
> _broker.unlock();
> }
> }
> public void popFetchPlan() {
> assertNotCloseInvoked();
> _broker.lock();
> try {
> _broker.popFetchConfiguration(); <<< but never remove when the fetch plan is popped.
> } finally {
> _broker.unlock();
> }
> }
> The only time _plans is cleaned up are during clear() or closed().
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (OPENJPA-1713) OutOfMemory caused by
EntityManagerImpl.push/popFetchPlan processing
Posted by "Albert Lee (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1713?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Albert Lee closed OPENJPA-1713.
-------------------------------
> OutOfMemory caused by EntityManagerImpl.push/popFetchPlan processing
> --------------------------------------------------------------------
>
> Key: OPENJPA-1713
> URL: https://issues.apache.org/jira/browse/OPENJPA-1713
> Project: OpenJPA
> Issue Type: Bug
> Components: kernel
> Affects Versions: 1.1.0, 1.2.2, 2.0.0
> Reporter: Albert Lee
> Assignee: Albert Lee
> Fix For: 2.0.1, 2.1.0
>
>
> There is a leak in memory in the EntityManagerImpl push/popFetchPlan processing where fetch plan associated with the current fetch configuration is add to the _plans IdentityHashMap but never remove from it.
> private Map<FetchConfiguration,FetchPlan> _plans = new IdentityHashMap<FetchConfiguration,FetchPlan>(1);
> public FetchPlan getFetchPlan() {
> assertNotCloseInvoked();
> _broker.lock();
> try {
> FetchConfiguration fc = _broker.getFetchConfiguration();
> FetchPlan fp = _plans.get(fc);
> if (fp == null) {
> fp = _emf.toFetchPlan(_broker, fc);
> _plans.put(fc, fp); <<< added to _plans
> }
> return fp;
> } finally {
> _broker.unlock();
> }
> }
> public FetchPlan pushFetchPlan() {
> assertNotCloseInvoked();
> _broker.lock();
> try {
> _broker.pushFetchConfiguration();
> return getFetchPlan();
> } finally {
> _broker.unlock();
> }
> }
> public void popFetchPlan() {
> assertNotCloseInvoked();
> _broker.lock();
> try {
> _broker.popFetchConfiguration(); <<< but never remove when the fetch plan is popped.
> } finally {
> _broker.unlock();
> }
> }
> The only time _plans is cleaned up are during clear() or closed().
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (OPENJPA-1713) OutOfMemory caused by
EntityManagerImpl.push/popFetchPlan processing
Posted by "Donald Woods (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1713?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12896691#action_12896691 ]
Donald Woods commented on OPENJPA-1713:
---------------------------------------
Is this ready to mark as resolved for 2.0.1 and trunk? No activity since July 7th.....
> OutOfMemory caused by EntityManagerImpl.push/popFetchPlan processing
> --------------------------------------------------------------------
>
> Key: OPENJPA-1713
> URL: https://issues.apache.org/jira/browse/OPENJPA-1713
> Project: OpenJPA
> Issue Type: Bug
> Components: kernel
> Affects Versions: 1.1.0, 1.2.2, 2.0.0
> Reporter: Albert Lee
> Assignee: Albert Lee
> Fix For: 2.0.1, 2.1.0
>
>
> There is a leak in memory in the EntityManagerImpl push/popFetchPlan processing where fetch plan associated with the current fetch configuration is add to the _plans IdentityHashMap but never remove from it.
> private Map<FetchConfiguration,FetchPlan> _plans = new IdentityHashMap<FetchConfiguration,FetchPlan>(1);
> public FetchPlan getFetchPlan() {
> assertNotCloseInvoked();
> _broker.lock();
> try {
> FetchConfiguration fc = _broker.getFetchConfiguration();
> FetchPlan fp = _plans.get(fc);
> if (fp == null) {
> fp = _emf.toFetchPlan(_broker, fc);
> _plans.put(fc, fp); <<< added to _plans
> }
> return fp;
> } finally {
> _broker.unlock();
> }
> }
> public FetchPlan pushFetchPlan() {
> assertNotCloseInvoked();
> _broker.lock();
> try {
> _broker.pushFetchConfiguration();
> return getFetchPlan();
> } finally {
> _broker.unlock();
> }
> }
> public void popFetchPlan() {
> assertNotCloseInvoked();
> _broker.lock();
> try {
> _broker.popFetchConfiguration(); <<< but never remove when the fetch plan is popped.
> } finally {
> _broker.unlock();
> }
> }
> The only time _plans is cleaned up are during clear() or closed().
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (OPENJPA-1713) OutOfMemory caused by
EntityManagerImpl.push/popFetchPlan processing
Posted by "Albert Lee (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1713?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Albert Lee resolved OPENJPA-1713.
---------------------------------
Resolution: Fixed
> OutOfMemory caused by EntityManagerImpl.push/popFetchPlan processing
> --------------------------------------------------------------------
>
> Key: OPENJPA-1713
> URL: https://issues.apache.org/jira/browse/OPENJPA-1713
> Project: OpenJPA
> Issue Type: Bug
> Components: kernel
> Affects Versions: 1.1.0, 1.2.2, 2.0.0
> Reporter: Albert Lee
> Assignee: Albert Lee
> Fix For: 2.0.1, 2.1.0
>
>
> There is a leak in memory in the EntityManagerImpl push/popFetchPlan processing where fetch plan associated with the current fetch configuration is add to the _plans IdentityHashMap but never remove from it.
> private Map<FetchConfiguration,FetchPlan> _plans = new IdentityHashMap<FetchConfiguration,FetchPlan>(1);
> public FetchPlan getFetchPlan() {
> assertNotCloseInvoked();
> _broker.lock();
> try {
> FetchConfiguration fc = _broker.getFetchConfiguration();
> FetchPlan fp = _plans.get(fc);
> if (fp == null) {
> fp = _emf.toFetchPlan(_broker, fc);
> _plans.put(fc, fp); <<< added to _plans
> }
> return fp;
> } finally {
> _broker.unlock();
> }
> }
> public FetchPlan pushFetchPlan() {
> assertNotCloseInvoked();
> _broker.lock();
> try {
> _broker.pushFetchConfiguration();
> return getFetchPlan();
> } finally {
> _broker.unlock();
> }
> }
> public void popFetchPlan() {
> assertNotCloseInvoked();
> _broker.lock();
> try {
> _broker.popFetchConfiguration(); <<< but never remove when the fetch plan is popped.
> } finally {
> _broker.unlock();
> }
> }
> The only time _plans is cleaned up are during clear() or closed().
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.