Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 23141 invoked from network); 27 Sep 2007 15:09:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 27 Sep 2007 15:09:20 -0000 Received: (qmail 43412 invoked by uid 500); 27 Sep 2007 15:09:10 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 43381 invoked by uid 500); 27 Sep 2007 15:09:10 -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 43372 invoked by uid 99); 27 Sep 2007 15:09:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Sep 2007 08:09:10 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Sep 2007 15:09:11 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 24222714201 for ; Thu, 27 Sep 2007 08:08:51 -0700 (PDT) Message-ID: <21382231.1190905731138.JavaMail.jira@brutus> Date: Thu, 27 Sep 2007 08:08:51 -0700 (PDT) From: =?utf-8?Q?=C3=98ystein_Gr=C3=B8vlen_=28JIRA=29?= To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-2892) Closing a resultset after retrieving a large > 32665 bytes value with Network Server does not release locks In-Reply-To: <28283072.1183475946233.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-2892?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel#action_12530752 ]=20 =C3=98ystein Gr=C3=B8vlen commented on DERBY-2892: ---------------------------------------- So my plan to fix this has two parts: 1. Change the locking so that the lock for a LOB is released when the LOB object is closed. My studies so far indicates that this can be achieved as follows: a) Use read committed instead of repeatable read for the locking policy in OverflowInputStream#initStream. This will associate the lock with the BaseContainerHandle that owns the OverflowInputStream instead of the transaction. b) Release the locks for the BaseContainerHandle that owns the OverflowInputStream when it is closed. (Debugging shows that OverflowInputStream#close is called when a Blob/Clob object is freed.) 2. Make sure a client releases locators when they are not to be used anymore. That is, the procedure to release a locator obtained by getBinaryStream etc. will be called when next() or close() is called on the result set. Since, according to the JDBC spec, such streams are only valid until the next getXXX call, there should only be necessary to keep track of one such locator at a time. So when a new stream is opened, the previous locator can be released. Hence, it should not be necessary to maintain a set of locators for the current row, one single "current" locator per result set is sufficient. > Closing a resultset after retrieving a large > 32665 bytes value with Net= work Server does not release locks > -------------------------------------------------------------------------= ---------------------------------- > > Key: DERBY-2892 > URL: https://issues.apache.org/jira/browse/DERBY-2892 > Project: Derby > Issue Type: Bug > Components: SQL > Affects Versions: 10.2.2.0, 10.3.1.4 > Environment: JDK: build 1.6.0_01-b06 (WinXP & Gentoo/SuSE) > Hardware: Intel x86 > Client/Server environment > Reporter: Thomas Niessen > Priority: Critical > Fix For: 10.2.2.1 > > Attachments: DERBY-2892_07_10_07_try1_diff.txt, DERBY-2892_07_10_= 07_try1_stat.txt, DERBY-2892_07_13_07_try2_diff.txt, DERBY-2892_07_13_07_tr= y2_stat.txt, protocolErrorRepro.zip > > > This is the same issue as DERBY-255 (https://issues.apache.org/jira/brows= e/DERBY-255). The test attached to DERBY-255 shows the locks being not rele= ased. Everything is fine when using Derby 10.1.3.1 . > I would think it's a regression bug. > Output from sysinfo: > ------------------ Java-Informationen ------------------ > Java-Version: 1.6.0_01 > Java-Anbieter: Sun Microsystems Inc. > Java-Home: C:\work\applications\development\java\jdk1.6u1-SE\jre > Java-Klassenpfad: C:\work\applications\development\derby-10.2.2.0/lib/der= by.jar;C:\work\applications\development\derby- > 0.2.2.0/lib/derbynet.jar;C:\work\applications\development\derby-10.2.2.0/= lib/derbyclient.jar;C:\work\applications\devel > pment\derby-10.2.2.0/lib/derbytools.jar > Name des Betriebssystems: Windows XP > Architektur des Betriebssystems: x86 > Betriebssystemversion: 5.1 > Java-Benutzername: thomas.niessen > Java-Benutzerausgangsverzeichnis: C:\Dokumente und Einstellungen\thomas.n= iessen > Java-Benutzerverzeichnis: C:\work\applications\development\derby-10.2.2.0 > java.specification.name: Java Platform API Specification > java.specification.version: 1.6 > --------- Derby-Informationen -------- > JRE - JDBC: Java SE 6 - JDBC 4.0 > [C:\work\applications\development\derby-10.2.2.0\lib\derby.jar] 10.2.2.0 = - (485682) > [C:\work\applications\development\derby-10.2.2.0\lib\derbytools.jar] 10.2= .2.0 - (485682) > [C:\work\applications\development\derby-10.2.2.0\lib\derbynet.jar] 10.2.2= .0 - (485682) > [C:\work\applications\development\derby-10.2.2.0\lib\derbyclient.jar] 10.= 2.2.0 - (485682) > ------------------------------------------------------ > ----------------- Informationen zur L=C3=B5ndereinstellung --------------= --- > Aktuelle L=C3=B5ndereinstellung: [Deutsch/Deutschland [de_DE]] > Es wurde Unterst=C2=B3tzung f=C2=B3r die folgende L=C3=B5ndereinstellung = gefunden: [cs] > Version: 10.2.2.0 - (485682) > Es wurde Unterst=C2=B3tzung f=C2=B3r die folgende L=C3=B5ndereinstellung = gefunden: [de_DE] > Version: 10.2.2.0 - (485682) > Es wurde Unterst=C2=B3tzung f=C2=B3r die folgende L=C3=B5ndereinstellung = gefunden: [es] > Version: 10.2.2.0 - (485682) > Es wurde Unterst=C2=B3tzung f=C2=B3r die folgende L=C3=B5ndereinstellung = gefunden: [fr] > Version: 10.2.2.0 - (485682) > Es wurde Unterst=C2=B3tzung f=C2=B3r die folgende L=C3=B5ndereinstellung = gefunden: [hu] > Version: 10.2.2.0 - (485682) > Es wurde Unterst=C2=B3tzung f=C2=B3r die folgende L=C3=B5ndereinstellung = gefunden: [it] > Version: 10.2.2.0 - (485682) > Es wurde Unterst=C2=B3tzung f=C2=B3r die folgende L=C3=B5ndereinstellung = gefunden: [ja_JP] > Version: 10.2.2.0 - (485682) > Es wurde Unterst=C2=B3tzung f=C2=B3r die folgende L=C3=B5ndereinstellung = gefunden: [ko_KR] > Version: 10.2.2.0 - (485682) > Es wurde Unterst=C2=B3tzung f=C2=B3r die folgende L=C3=B5ndereinstellung = gefunden: [pl] > Version: 10.2.2.0 - (485682) > Es wurde Unterst=C2=B3tzung f=C2=B3r die folgende L=C3=B5ndereinstellung = gefunden: [pt_BR] > Version: 10.2.2.0 - (485682) > Es wurde Unterst=C2=B3tzung f=C2=B3r die folgende L=C3=B5ndereinstellung = gefunden: [ru] > Version: 10.2.2.0 - (485682) > Es wurde Unterst=C2=B3tzung f=C2=B3r die folgende L=C3=B5ndereinstellung = gefunden: [zh_CN] > Version: 10.2.2.0 - (485682) > Es wurde Unterst=C2=B3tzung f=C2=B3r die folgende L=C3=B5ndereinstellung = gefunden: [zh_TW] > Version: 10.2.2.0 - (485682) --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.