Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 39189 invoked from network); 3 Mar 2008 10:37:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Mar 2008 10:37:58 -0000 Received: (qmail 89324 invoked by uid 500); 3 Mar 2008 10:37:53 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 89124 invoked by uid 500); 3 Mar 2008 10:37:52 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 89113 invoked by uid 99); 3 Mar 2008 10:37:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Mar 2008 02:37:52 -0800 X-ASF-Spam-Status: No, hits=-1.0 required=10.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [192.18.6.21] (HELO gmp-eb-inf-1.sun.com) (192.18.6.21) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Mar 2008 10:37:16 +0000 Received: from fe-emea-10.sun.com (gmp-eb-lb-2-fe3.eu.sun.com [192.18.6.12]) by gmp-eb-inf-1.sun.com (8.13.7+Sun/8.12.9) with ESMTP id m23AbN1t005027 for ; Mon, 3 Mar 2008 10:37:24 GMT Received: from conversion-daemon.fe-emea-10.sun.com by fe-emea-10.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) id <0JX500I01HC4EG00@fe-emea-10.sun.com> (original mail from Oystein.Grovlen@Sun.COM) for derby-user@db.apache.org; Mon, 03 Mar 2008 10:37:23 +0000 (GMT) Received: from [129.159.112.249] by fe-emea-10.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) with ESMTPSA id <0JX500M8HHIAT4F0@fe-emea-10.sun.com> for derby-user@db.apache.org; Mon, 03 Mar 2008 10:37:23 +0000 (GMT) Date: Mon, 03 Mar 2008 11:37:22 +0100 From: =?ISO-8859-1?Q?=D8ystein_Gr=F8vlen?= Subject: Re: Derby, identity columns & locks on syscolumns In-reply-to: <882C3355DFF9D3468379DD1E8C115FC713BE48714A@EVS-RED.coloflorida.com> Sender: Oystein.Grovlen@Sun.COM To: Derby Discussion Message-id: <47CBD4E2.6060703@sun.com> MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=ISO-8859-1 Content-transfer-encoding: 8BIT References: <882C3355DFF9D3468379DD1E8C115FC713BE48714A@EVS-RED.coloflorida.com> User-Agent: Thunderbird 2.0.0.9 (X11/20071119) X-Virus-Checked: Checked by ClamAV on apache.org Andrew Lawrenson wrote: > I've done some more experimentation & testing. > > At the moment, when syscolumns is updated, if a sub-transction is done, the update is done with an expicit no-wait on locks. > I've tried changing this so that it will use the same wait policy as the parent transaction - when this is done, I see none of the problems reported, and can have up to 100 concurrent threads inserting without any failing (whereas before this would instantly lock up). > > So the question now is: "is the no-wait for the sub-transaction actually necessary?". > > Personally, I can't see why it is, although I'm not exactly a guru at derby internals. If the reason why is simply to increase concurrency, then I think it's flawed, as it forces more updates to be carried out by the parent transaction, which will hold the lock much longer before committing... > > Any ideas? Or is this the wrong list to be asking - should I pose this on derby-developers instead? > I think derby-dev is more appropriate for this discussion. I do not know why there is a no-wait for subtransactions, maybe it is done to avoid risks of deadlocks. You could try running the Derby test suites to see if some problems are revealed. -- �ystein