Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 46555 invoked from network); 31 Mar 2008 21:32:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 31 Mar 2008 21:32:50 -0000 Received: (qmail 33238 invoked by uid 500); 31 Mar 2008 21:32:50 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 33211 invoked by uid 500); 31 Mar 2008 21:32:50 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 33202 invoked by uid 99); 31 Mar 2008 21:32:49 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 31 Mar 2008 14:32:49 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 31 Mar 2008 21:32:07 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id D875E234C0AF for ; Mon, 31 Mar 2008 14:30:24 -0700 (PDT) Message-ID: <556351246.1206999024885.JavaMail.jira@brutus> Date: Mon, 31 Mar 2008 14:30:24 -0700 (PDT) From: "Knut Anders Hatlen (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-3571) LOB locators are not released if the LOB columns are not accessed by the client In-Reply-To: <897452782.1206547404409.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-3571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12583882#action_12583882 ] Knut Anders Hatlen commented on DERBY-3571: ------------------------------------------- All elements of SingleReleaseLOBTracker.trackColumn[] are false until checkCurrentRow() is called (normally on ResultSet.next()). Doesn't this mean that the LOBs in the first row returned from the query won't be released until the transaction is completed? In SingleReleaseLOBTracker.checkCurrentRow(), should trackColumn[i] be set to true unconditionally rather than in the else block? Whether or not column i were accessed in row n shouldn't affect whether we release the locator in row n+1, should it? Nit: SingleReleaseLOBTracker.noRelease() doesn't need the sanity check variable (indexFound) if "break" is replaced with "return", and "ASSERT" is replaced with "THROWASSERT". Actually, since columns[] is a sorted int array (isn't it?), it should be possible to simplify this method further by using Arrays.binarySearch(). Typo in ResultSet.createLOBColumnTracker(): "simply" -> "simplify" > LOB locators are not released if the LOB columns are not accessed by the client > ------------------------------------------------------------------------------- > > Key: DERBY-3571 > URL: https://issues.apache.org/jira/browse/DERBY-3571 > Project: Derby > Issue Type: Bug > Components: JDBC, Network Client > Affects Versions: 10.3.2.1, 10.4.0.0, 10.5.0.0 > Reporter: Kristian Waagan > Assignee: Kristian Waagan > Attachments: derby-3571-1a-client_track_lob_fix.diff, derby-3571-1a-client_track_lob_fix.stat, derby-3571-1b-client_track_lob_fix.diff, derby-3571-1c-client_track_lob_fix.diff, derby-3571-1d-client_track_lob_fix.diff, derby-3571-1e-client_track_lob_fix.diff > > > If the client creates a result set containing LOB locator columns and iterates through it without actually accessing the LOB columns, the locators are not released. > The amount of locators and their associated LOB objects causes the server to consume large amounts of memory and it eventually gets an OOME. > There are a few workarounds for this bug: > a) Access and/or properly close the LOBs (i.e. Blob.free). > This is partly dependent on DERBY-2892. > b) Invoke Connection.commit (or rollback) periodically, which causes all locators on the connection to be released. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.