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 2028A9092 for ; Fri, 3 Feb 2012 17:06:18 +0000 (UTC) Received: (qmail 51939 invoked by uid 500); 3 Feb 2012 17:06:18 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 51880 invoked by uid 500); 3 Feb 2012 17:06:17 -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 51867 invoked by uid 99); 3 Feb 2012 17:06:17 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Feb 2012 17:06:17 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Feb 2012 17:06:14 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id D36F918B80F for ; Fri, 3 Feb 2012 17:05:53 +0000 (UTC) Date: Fri, 3 Feb 2012 17:05:53 +0000 (UTC) From: "Albert Lee (Updated) (JIRA)" To: dev@openjpa.apache.org Message-ID: <433656306.8153.1328288753868.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (OPENJPA-1193) Memory leak when using FinalizingBrokerImpl MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/OPENJPA-1193?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Albert Lee updated OPENJPA-1193: -------------------------------- Affects Version/s: 2.2.0 2.1.1 Fix Version/s: (was: 2.2.0) Remove fix version in preparation for 2.2.0 release. > Memory leak when using FinalizingBrokerImpl > ------------------------------------------- > > Key: OPENJPA-1193 > URL: https://issues.apache.org/jira/browse/OPENJPA-1193 > Project: OpenJPA > Issue Type: Bug > Components: kernel > Affects Versions: 1.2.0, 1.2.1, 2.1.1, 2.2.0 > Environment: All environments where the finalizing broker is used > Reporter: David Minor > Assignee: Donald Woods > Fix For: 1.3.0 > > Attachments: fix-finalizing-broker-memory-leak.patch > > > When FinalizingBrokerImpl is used, AbstractBrokerFactory uses a set backed by java's ConcurrentHashMap to keep track of brokers, rather than a weak reference org.apache.openjpa.lib.util.concurrent.ConcurrentReferenceHashSet as it did previously. This can lead to a memory leak if the brokers are never removed from the Set. > The change was originally checked in by Patrick Linskey in revision 653000 with the comment "Improve concurrency by actively managing AbstractBrokerFactory's broker set when using non-finalizing brokers. Credit goes to Arunabh Hazarika for identifying the bottleneck and prototyping this solution." > Changing the _brokers Set back to a weak reference ConcurrentReferenceHashSet fixes the memory leak. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira