[ 
https://issues.apache.org/jira/browse/DERBY-6533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13959141#comment-13959141
 ] 

Rick Hillegas commented on DERBY-6533:
--------------------------------------

I ran the revised NsTest for 7 hours on a fairly beefy (8 core) machine. This 
produced the following results. As you can see, exactly 1 error occurred (a 
lock timeout while getting a table descriptor during compilation):

{noformat}
STATISTICS OF OPERATIONS DONE
-----------------------------



Start time = 2014-04-03 14:39:12.016
End time = 2014-04-03 21:39:12.021
Duration = 420 minutes



SUCCESSFUL: 
        Number of INSERTS = 1732859
        Number of UPDATES = 854518
        Number of DELETES = 853434
        Number of SELECTS = 76975

FAILED: 
        Number of failed INSERTS = 0
        Number of failed UPDATES = 831033
        Number of failed DELETES = 830546
        Number of failed SELECTS = 0

  Note that this may not be the same as the server side connections made
   to the database especially if connection pooling is employed

NOTE: Failing operations could be because of locking issue that are
directly related to the application logic.  They are not necessarily bugs.

Max sequence counter peeked at = 1767493



        Number of 40XL1 = 1


//////////////////////////////////////////////////////////////
//    
//    Count = 1, SQLState = 40XL1, Message = A lock could not be obtained 
within the time requested
//    
//////////////////////////////////////////////////////////////

java.sql.SQLTransactionRollbackException: A lock could not be obtained within 
the time requested
        at 
org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:92)
        at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Util.java:233)
        at 
org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:424)
        at 
org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java:353)
        at 
org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java:2396)
        at 
org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java:82)
        at 
org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1430)
        at 
org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(EmbedPreparedStatement.java:1709)
        at 
org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeLargeUpdate(EmbedPreparedStatement.java:320)
        at 
org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeUpdate(EmbedPreparedStatement.java:309)
        at 
org.apache.derbyTesting.system.nstest.utils.DbUtil.delete_one_row(DbUtil.java:436)
        at 
org.apache.derbyTesting.system.nstest.tester.TesterObject.doIUDOperation(TesterObject.java:175)
        at 
org.apache.derbyTesting.system.nstest.tester.Tester1.startTesting(Tester1.java:114)
        at org.apache.derbyTesting.system.nstest.NsTest.run(NsTest.java:775)
Caused by: ERROR 40XL1: A lock could not be obtained within the time requested
        at 
org.apache.derby.iapi.error.StandardException.newException(StandardException.java:290)
        at 
org.apache.derby.iapi.error.StandardException.newException(StandardException.java:285)
        at 
org.apache.derby.impl.services.locks.ConcurrentLockSet.lockObject(ConcurrentLockSet.java:619)
        at 
org.apache.derby.impl.services.locks.AbstractPool.lockObject(AbstractPool.java:120)
        at 
org.apache.derby.impl.services.locks.ConcurrentPool.lockObject(ConcurrentPool.java:28)
        at 
org.apache.derby.impl.store.raw.xact.RowLocking3.lockRecordForRead(RowLocking3.java:188)
        at 
org.apache.derby.impl.store.access.heap.HeapController.lockRow(HeapController.java:531)
        at 
org.apache.derby.impl.store.access.heap.HeapController.lockRow(HeapController.java:648)
        at 
org.apache.derby.impl.store.access.btree.index.B2IRowLocking3.lockRowOnPage(B2IRowLocking3.java:306)
        at 
org.apache.derby.impl.store.access.btree.index.B2IRowLocking3._lockScanRow(B2IRowLocking3.java:590)
        at 
org.apache.derby.impl.store.access.btree.index.B2IRowLockingRR.lockScanRow(B2IRowLockingRR.java:104)
        at 
org.apache.derby.impl.store.access.btree.BTreeForwardScan.fetchRows(BTreeForwardScan.java:313)
        at 
org.apache.derby.impl.store.access.btree.BTreeScan.fetchNext(BTreeScan.java:1600)
        at 
org.apache.derby.impl.sql.catalog.DataDictionaryImpl.getDescriptorViaIndexMinion(DataDictionaryImpl.java:9333)
        at 
org.apache.derby.impl.sql.catalog.DataDictionaryImpl.getDescriptorViaIndex(DataDictionaryImpl.java:9196)
        at 
org.apache.derby.impl.sql.catalog.DataDictionaryImpl.getColumnDescriptorsScan(DataDictionaryImpl.java:2850)
        at 
org.apache.derby.impl.sql.catalog.DataDictionaryImpl.getColumnDescriptorsScan(DataDictionaryImpl.java:2814)
        at 
org.apache.derby.impl.sql.catalog.DataDictionaryImpl.finishTableDescriptor(DataDictionaryImpl.java:2376)
        at 
org.apache.derby.impl.sql.catalog.DataDictionaryImpl.getTableDescriptorIndex2Scan(DataDictionaryImpl.java:2355)
        at 
org.apache.derby.impl.sql.catalog.DataDictionaryImpl.getUncachedTableDescriptor(DataDictionaryImpl.java:2319)
        at 
org.apache.derby.impl.sql.catalog.OIDTDCacheable.setIdentity(OIDTDCacheable.java:107)
        at 
org.apache.derby.impl.services.cache.ConcurrentCache.find(ConcurrentCache.java:295)
        at 
org.apache.derby.impl.sql.catalog.DataDictionaryImpl.getTableDescriptor(DataDictionaryImpl.java:2290)
        at 
org.apache.derby.iapi.sql.dictionary.SPSDescriptor.compileStatement(SPSDescriptor.java:353)
        at 
org.apache.derby.iapi.sql.dictionary.SPSDescriptor.prepareAndRelease(SPSDescriptor.java:264)
        at 
org.apache.derby.iapi.sql.dictionary.SPSDescriptor.getPreparedStatement(SPSDescriptor.java:769)
        at 
org.apache.derby.iapi.sql.dictionary.SPSDescriptor.getPreparedStatement(SPSDescriptor.java:655)
        at 
org.apache.derby.impl.sql.execute.GenericTriggerExecutor.executeSPS(GenericTriggerExecutor.java:171)
        at 
org.apache.derby.impl.sql.execute.GenericTriggerExecutor.executeWhenClauseAndAction(GenericTriggerExecutor.java:346)
        at 
org.apache.derby.impl.sql.execute.RowTriggerExecutor.fireTrigger(RowTriggerExecutor.java:113)
        at 
org.apache.derby.impl.sql.execute.TriggerEventActivator.notifyEvent(TriggerEventActivator.java:272)
        at 
org.apache.derby.impl.sql.execute.DeleteResultSet.fireAfterTriggers(DeleteResultSet.java:464)
        at 
org.apache.derby.impl.sql.execute.DeleteResultSet.open(DeleteResultSet.java:157)
        at 
org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(GenericPreparedStatement.java:470)
        at 
org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:349)
        at 
org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1338)
        ... 7 more
{noformat}

> Add a quiet mode to NsTest
> --------------------------
>
>                 Key: DERBY-6533
>                 URL: https://issues.apache.org/jira/browse/DERBY-6533
>             Project: Derby
>          Issue Type: Improvement
>          Components: Test
>    Affects Versions: 10.11.0.0
>            Reporter: Rick Hillegas
>            Assignee: Rick Hillegas
>         Attachments: derby-6533-01-aa-quietMode.diff, 
> derby-6533-02-aa-sequencesAndMoreStats.diff, 
> derby-6533-02-aa-sequencesAndMoreStats.out
>
>
> Right now NsTest produces an enormous log file. This may be useful for 
> tracking down some errors. However, this can also make it hard to find the 
> signal in the noise. It would be good to turn off the chatty diagnostics 
> which report the result of every insert, update, delete, and select. A 
> summary at the end may be good enough, including a summary of the number of 
> times each kind of error (SQLState) was seen. While I'm in there, I plan to 
> make other smallish changes.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to