db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oystein.Grov...@Sun.COM (Øystein Grøvlen)
Subject Re: [jira] Commented: (DERBY-230) "Schema already exists" when creating a table
Date Thu, 05 May 2005 14:43:34 GMT

I was thinking I should add a test for this bug fix.  Since a
multithreaded program is needed, I was trying to use the MultiTest
framework, but despite trying several approaches I have not been able
to reproduce it that way.  Note that I in 20 minutes was able to write
the Java program that is attached to the jira entry.  This programs
will reproduce the bug in approx. 1 of 3 runs (each run takes less
than 10 seconds).

Is there any way to add a multi-threaded program to the testsuite?

In my opinion, the MultiTest framework is not very suited for
reproducing bugs or testing specific concurrency
mechanisms/algorithms/protocols.  You have no control of what is
executing concurrently and just has to rely on that the scenario you
are looking for will happen by accident if run long enough.  That does
not make the testing very efficient.

--
Øystein

>>>>> "ØG(" == Øystein Grøvlen (JIRA) <derby-dev@db.apache.org> writes:

    >> "Schema already exists" when creating a table
    >> ---------------------------------------------
    >> 
    >> Key: DERBY-230
    >> URL: http://issues.apache.org/jira/browse/DERBY-230
    >> Project: Derby
    >> Type: Bug
    >> Components: SQL
    >> Versions: 10.0.2.1, 10.0.2.0, 10.0.2.2, 10.1.0.0
    >> Reporter: Øystein Grøvlen
    >> Assignee: Øystein Grøvlen
    >> Priority: Minor
    >> Attachments: Main.java
    >> 
    >> When running a multithreaded program where several threads in parallell create
tables in a schema that is not explicitly created, one often get the following exception:
    >> ERROR X0Y68: Schema 'TESTSCHEMA' already exists.
    >> at org.apache.derby.iapi.error.StandardException.newException(StandardException.java:322)
    >> at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.duplicateDescriptorException(DataDictionaryImpl.java:1512)
    >> at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.addDescriptorNow(DataDictionaryImpl.java:1496)
    >> at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.addDescriptor(DataDictionaryImpl.java:1478)
    >> at org.apache.derby.impl.sql.execute.CreateSchemaConstantAction.executeConstantAction(CreateSchemaConstantAction.java:147)
    >> at org.apache.derby.impl.sql.execute.DDLConstantAction.getSchemaDescriptorForCreate(Unknown
Source)
    >> at org.apache.derby.impl.sql.execute.CreateTableConstantAction.executeConstantAction(CreateTableConstantAction.java:213)
    >> at org.apache.derby.impl.sql.execute.MiscResultSet.open(MiscResultSet.java:56)
    >> at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:366)
    >> at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1108)
    >> at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:517)
    >> at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java:475)
    >> at derbytest.Main$CreateTable.run(Main.java:42)
    >> at java.lang.Thread.run(Thread.java:595)
    >> A program that reproduces this bug will be attached.

    ØG(> -- 
    ØG(> This message is automatically generated by JIRA.
    ØG(> -
    ØG(> If you think it was sent incorrectly contact one of the administrators:
    ØG(>    http://issues.apache.org/jira/secure/Administrators.jspa
    ØG(> -
    ØG(> For more information on JIRA, see:
    ØG(>    http://www.atlassian.com/software/jira




-- 
Øystein


Mime
View raw message