db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Hillegas (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DERBY-6977) Autogenerated index name occasionally generates a name which already exists
Date Sun, 12 Nov 2017 22:15:01 GMT

     [ https://issues.apache.org/jira/browse/DERBY-6977?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Rick Hillegas updated DERBY-6977:
---------------------------------
    Attachment: derby-6977-01-ac-useUUID.diff

Attaching derby-6977-01-ac-useUUID.diff. This patch adds the SQL prefix back in and adds a
strictly increasing numeric string. The extra numeric string does not affect the uniqueness
of the generated name, it merely guarantees deterministic regression test results. For some
reason, I cannot get the following tests to succeed, even though the .out files produced by
the test runs are identical to the test canons. I will have to look into this. If someone
knows what's special about these tests, I would appreciate a clue here.

  derbynetclientmats/dblook_test_net
  derbynetclientmats/dblook_test_net_territory

Touches the following files:

M       java/engine/org/apache/derby/iapi/sql/dictionary/DataDictionary.java
M       java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java
M       java/testing/org/apache/derbyTesting/functionTests/harness/Sed.java
M       java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/dblook_test_net.out
M       java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/dblook_test_net_territory.out
M       java/testing/org/apache/derbyTesting/functionTests/tests/lang/SelectivityTest.java
M       java/testing/org/apache/derbyTesting/junit/JDBC.java


> Autogenerated index name occasionally generates a name which already exists
> ---------------------------------------------------------------------------
>
>                 Key: DERBY-6977
>                 URL: https://issues.apache.org/jira/browse/DERBY-6977
>             Project: Derby
>          Issue Type: Bug
>    Affects Versions: 10.13.1.1
>            Reporter: Trejkaz
>         Attachments: derby-6977-01-aa-useUUID.diff, derby-6977-01-ab-useUUID.diff, derby-6977-01-ac-useUUID.diff
>
>
> This has been happening for as long as I can remember, but v10.13.1.1 is the version
we're currently at and I still see builds fail at random due to this.
> In a migration, we execute this statement:
> {noformat}
> CREATE TABLE GuidMappingCache (
>     guidhigh  BIGINT NOT NULL,
>     guidlow BIGINT NOT NULL,
>     luceneid INTEGER NOT NULL,
>     PRIMARY KEY (guidhigh, guidlow)
> )
> {noformat}
> This randomly fails with the following sort of error:
> {noformat}
> Caused by: java.sql.SQLException: Index 'SQL171110050418720' already exists in Schema
'APP'.
> 	at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
> 	at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
> 	at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
> 	at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
> 	at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
> 	at OurCode.execute(...)
> Caused by: ERROR X0Y32: Index 'SQL171110050418720' already exists in Schema 'APP'.
> 	at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
> 	at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
> 	at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.duplicateDescriptorException(Unknown
Source)
> 	at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.addDescriptor(Unknown Source)
> 	at org.apache.derby.impl.sql.execute.CreateIndexConstantAction.executeConstantAction(Unknown
Source)
> 	at org.apache.derby.impl.sql.execute.CreateConstraintConstantAction.executeConstantAction(Unknown
Source)
> 	at org.apache.derby.impl.sql.execute.CreateTableConstantAction.executeConstantAction(Unknown
Source)
> 	at org.apache.derby.impl.sql.execute.MiscResultSet.open(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
> 	at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
> 	... 37 more
> {noformat}
> The last time someone was looking into this, it was somehow very reproducible for them
but not for anyone else. I'm now seeing it occasionally on tests on our build farm. As usual,
no matter how many times I run the test here, I can't get the same failure to occur.
> How is this value being generated?



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message