Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 37534 invoked from network); 3 Jul 2009 10:21:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 3 Jul 2009 10:21:59 -0000 Received: (qmail 32729 invoked by uid 500); 3 Jul 2009 10:22:09 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 32675 invoked by uid 500); 3 Jul 2009 10:22:09 -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 32667 invoked by uid 99); 3 Jul 2009 10:22:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Jul 2009 10:22:09 +0000 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; Fri, 03 Jul 2009 10:22:07 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 44FD8234C052 for ; Fri, 3 Jul 2009 03:21:47 -0700 (PDT) Message-ID: <1429955767.1246616507281.JavaMail.jira@brutus> Date: Fri, 3 Jul 2009 03:21:47 -0700 (PDT) From: "Knut Anders Hatlen (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Updated: (DERBY-4055) Space may not be reclaimed if row locks are not available after three retries In-Reply-To: <1483012576.1234467779657.JavaMail.jira@brutus> 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/DERBY-4055?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Knut Anders Hatlen updated DERBY-4055: -------------------------------------- Issue & fix info: [High Value Fix, Workaround attached] (was: [High Value Fix]) Urgency: Normal Triaged for 10.5.2. > Space may not be reclaimed if row locks are not available after three retries > ------------------------------------------------------------------------------- > > Key: DERBY-4055 > URL: https://issues.apache.org/jira/browse/DERBY-4055 > Project: Derby > Issue Type: Bug > Components: Store > Affects Versions: 10.1.3.1, 10.2.2.0, 10.3.3.0, 10.4.2.0, 10.5.1.1 > Reporter: Kathey Marsden > Attachments: derby.log.T_RawStoreFactoryWithAssert > > > In a multithreaded clob update where the same row is being updated, space will not be reclaimed. The offending code is in ReclaimSpaceHelper: > RecordHandle headRecord = work.getHeadRowHandle(); > if (!container_rlock.lockRecordForWrite( > tran, headRecord, false /* not insert */, false /* nowait */)) > { > // cannot get the row lock, retry > tran.abort(); > if (work.incrAttempts() < 3) > { > return Serviceable.REQUEUE; > } > else > { > // If code gets here, the space will be lost forever, and > // can only be reclaimed by a full offline compress of the > // table/index. > if (SanityManager.DEBUG) > { > if (SanityManager.DEBUG_ON(DaemonService.DaemonTrace)) > { > SanityManager.DEBUG( > DaemonService.DaemonTrace, > " gave up after 3 tries to get row lock " + > work); > } > } > return Serviceable.DONE; > } > } > If we cannot get the lock after three tries we give up. The reproduction for this issue is in the test store.ClobReclamationTest.xtestMultiThreadUpdateSingleRow(). > This issue also used to reference the code below and has some references to trying to get a reproduction for that issue, but that work has moved to DERBY-4054. Please see DERBY-4054 for work on the container lock issue. > ContainerHandle containerHdl = > openContainerNW(tran, container_rlock, work.getContainerId()); > if (containerHdl == null) > { > tran.abort(); > if (SanityManager.DEBUG) > { > if (SanityManager.DEBUG_ON(DaemonService.DaemonTrace)) > { > SanityManager.DEBUG( > DaemonService.DaemonTrace, " aborted " + work + > " because container is locked or dropped"); > } > } > if (work.incrAttempts() < 3) // retry this for serveral times > { > return Serviceable.REQUEUE; > } > else > { > // If code gets here, the space will be lost forever, and > // can only be reclaimed by a full offline compress of the > // table/index. > if (SanityManager.DEBUG) > { > if (SanityManager.DEBUG_ON(DaemonService.DaemonTrace)) > { > SanityManager.DEBUG( > DaemonService.DaemonTrace, > " gave up after 3 tries to get container lock " + > work); > } > } > return Serviceable.DONE; > } > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.