Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 5553 invoked from network); 18 Aug 2007 20:19:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Aug 2007 20:19:54 -0000 Received: (qmail 17579 invoked by uid 500); 18 Aug 2007 20:19:51 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 17546 invoked by uid 500); 18 Aug 2007 20:19:51 -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 17535 invoked by uid 99); 18 Aug 2007 20:19:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 18 Aug 2007 13:19:51 -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; Sat, 18 Aug 2007 20:20:18 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id BAC65714191 for ; Sat, 18 Aug 2007 13:19:30 -0700 (PDT) Message-ID: <26972787.1187468370762.JavaMail.jira@brutus> Date: Sat, 18 Aug 2007 13:19:30 -0700 (PDT) From: "Kurt Huwig (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Resolved: (DERBY-3015) Concurrent select and insert deadlock on index In-Reply-To: <13625313.1187448631758.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-3015?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Kurt Huwig resolved DERBY-3015. ------------------------------- Resolution: Fixed Duplicate of DERBY-2991 > Concurrent select and insert deadlock on index > ---------------------------------------------- > > Key: DERBY-3015 > URL: https://issues.apache.org/jira/browse/DERBY-3015 > Project: Derby > Issue Type: Bug > Components: Store > Affects Versions: 10.3.1.4 > Reporter: Kurt Huwig > Attachments: Repro3015.java > > > From the derby mailinglist > The attached test is an attempt to simulate a typical data processing > application, it consists of: > - an insert thread that inserts records in batch > - a select thread that 'processes' the records inserted by the other > thread: 'select * from table where id > ?' > The test deadlocks. After examining them, I think that: > - the select thread holds an S lock on the root of the PK index: (1,1) > - the select thread waits for an S lock on one of the uncommitted inserts > - the insert thread holds X locks on the inserted records > - the insert thread tries to split the btree root of the PK index: > (1,1) by acquiring an X lock, so it's a deadlock > I've got the same problem nearly every day in my application, therefore I simplified the example file from the mailinglist. I did also try it with MySQL without a deadlock. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.