Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 45358 invoked from network); 4 Aug 2008 23:37:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Aug 2008 23:37:40 -0000 Received: (qmail 86363 invoked by uid 500); 4 Aug 2008 23:37:36 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 86285 invoked by uid 500); 4 Aug 2008 23:37:36 -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 85740 invoked by uid 99); 4 Aug 2008 23:37:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Aug 2008 16:37:34 -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, 04 Aug 2008 23:36:47 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 57DAA234C198 for ; Mon, 4 Aug 2008 16:36:44 -0700 (PDT) Message-ID: <1096434673.1217893004358.JavaMail.jira@brutus> Date: Mon, 4 Aug 2008 16:36:44 -0700 (PDT) From: "Daniel John Debrunner (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-48) A connection request that has a default schema that is being created by another transaction will fail to connect In-Reply-To: <1358642611.1098479493251.JavaMail.apache@nagoya> 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-48?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12619742#action_12619742 ] Daniel John Debrunner commented on DERBY-48: -------------------------------------------- I can't tell from the release note exactly what the incompatible change is so it's hard to comment on if it should be backported. E.g.: - The summary "This is no longer the case", it doesn't seem clear what 'This' refers to, should it be part of the previous sentence, e.g. "as well, this is ..."? Maybe the summary could be re-written to describe what does happen, rather than focusing on the previous behaviour? - In "Symptoms Seen ..." section it says the schema will be created earlier than it would have before, is this true, from the summary it seems it is created at the same time as previously? I.e. the only change is if the transaction is rolled back, not when the schema is created? - The "Rationale for change" is more describing what is implemented, rather than the justification for changing it. Maybe it could be more along the lines of: "Implicit schema creation is now performed in its own transaction to avoid deadlocks with other connections accessing the same schema" Is this change in behaviour for all implicit schema creations or just for the default schema, it was hard to tell from the comments in this entry? That might change the release note as well. > A connection request that has a default schema that is being created by another transaction will fail to connect > ----------------------------------------------------------------------------------------------------------------- > > Key: DERBY-48 > URL: https://issues.apache.org/jira/browse/DERBY-48 > Project: Derby > Issue Type: Bug > Components: JDBC > Affects Versions: 10.0.2.0, 10.0.2.1, 10.0.2.2, 10.1.1.0 > Reporter: Kathey Marsden > Assignee: Dag H. Wanvik > Fix For: 10.5.0.0 > > Attachments: derby-48-1.diff, derby-48-1.stat, derby-48-2.diff, derby-48-2.stat, derby-48-3.diff, derby-48-3.stat, derby-48-4.diff, derby-48-4.stat, derby-48-5.diff, derby-48-5.stat, derby-48-6.diff, derby-48-6.stat, derby-48-7.diff, derby-48-7.stat, LazyDefaultSchemaCreationTest.java, releaseNote.html > > > A connection request that has a default schema that is being > created by another transaction will block until that transaction > completes (or time out). Probably in this situation the connection > request should be succeed as if the schema does not exist. > This is a problem in particular for a prepared XA transaction, where even after restarting the system, the user cannot reconnect and recover the transaction. > Here is the reproduction in ij. > java -Dij.exceptionTrace=true -Dij.protocol=jdbc:derby: -Dij.user=me -Dij.password=pw org.apache.derby.tools.ij > ij version 10.0 (C) Copyright IBM Corp. 1997, 2004. > ij> connect 'testdb;create=true'; > ij> autocommit off; > ij> create table mytabi(i int); > 0 rows inserted/updated/deleted > ij> connect 'testdb'; > ERROR 40XL1: A lock could not be obtained within the time requestedERROR 40XL1: A lock could not be obtained within the time requested > at org.apache.derby.iapi.error.StandardException.newException(StandardException.java:295) > at org.apache.derby.impl.services.locks.LockSet.lockObject(LockSet.java:408) > at org.apache.derby.impl.services.locks.SinglePool.lockAnObject(SinglePool.java:168) > at org.apache.derby.impl.services.locks.SinglePool.lockObject(SinglePool.java:220) > at org.apache.derby.impl.store.raw.xact.RowLocking3.lockRecordForRead(RowLocking3.java:181) > at org.apache.derby.impl.store.access.heap.HeapController.lockRow(HeapController.java:425) > at org.apache.derby.impl.store.access.heap.HeapController.lockRow(HeapController.java:543) > at org.apache.derby.impl.store.access.btree.index.B2IRowLocking3.lockRowOnPage(B2IRowLocking3.java:329) > at org.apache.derby.impl.store.access.btree.index.B2IRowLocking3._lockScanRow(B2IRowLocking3.java:571) > at org.apache.derby.impl.store.access.btree.index.B2IRowLockingRR.lockScanRow(B2IRowLockingRR.java:115) > at org.apache.derby.impl.store.access.btree.BTreeForwardScan.fetchRows(BTreeForwardScan.java:374) > at org.apache.derby.impl.store.access.btree.BTreeScan.next(BTreeScan.java:1691) > at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.getDescriptorViaIndex(DataDictionaryImpl.java:7118) > at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.locateSchemaRow(DataDictionaryImpl.java:1381) > at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.getSchemaDescriptor(DataDictionaryImpl.java:1291) > at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.initDefaultSchemaDescriptor(GenericLanguageCon > at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.initialize(GenericLanguageConnectionContext.ja > at org.apache.derby.impl.db.BasicDatabase.setupConnection(BasicDatabase.java:267) > at org.apache.derby.impl.jdbc.TransactionResourceImpl.startTransaction(TransactionResourceImpl.java:182) > at org.apache.derby.impl.jdbc.EmbedConnection.(EmbedConnection.java:237) > at org.apache.derby.impl.jdbc.EmbedConnection20.(EmbedConnection20.java:49) > at org.apache.derby.impl.jdbc.EmbedConnection30.(EmbedConnection30.java:56) > at org.apache.derby.jdbc.Driver30.getNewEmbedConnection(Driver30.java:68) > at org.apache.derby.jdbc.Driver169.connect(Driver169.java:172) > at java.sql.DriverManager.getConnection(DriverManager.java:512) > at java.sql.DriverManager.getConnection(DriverManager.java:140) > at org.apache.derby.impl.tools.ij.ij.dynamicConnection(ij.java:843) > at org.apache.derby.impl.tools.ij.ij.ConnectStatement(ij.java:700) > at org.apache.derby.impl.tools.ij.ij.ijStatement(ij.java:528) > at org.apache.derby.impl.tools.ij.utilMain.go(utilMain.java:283) > at org.apache.derby.impl.tools.ij.Main.go(Main.java:204) > at org.apache.derby.impl.tools.ij.Main.mainCore(Main.java:170) > at org.apache.derby.impl.tools.ij.Main14.main(Main14.java:50) > at org.apache.derby.tools.ij.main(ij.java:54) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.