Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-6975

ERROR 40XL1: A lock could not be obtained within the time requested

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 10.14.1.0
    • Fix Version/s: None
    • Component/s: SQL
    • Labels:
      None
    • Issue & fix info:
      High Value Fix
    • Bug behavior facts:
      Deviation from standard, Wrong query result

      Description

      I have an application that when run on a certain dataset, every 5 runs I might see this error happening. The code is creating a lot of rows using a sequence generator.

      Caused by: ERROR 40XL1: A lock could not be obtained within the time requested 
              at org.apache.derby.iapi.error.StandardException.newException(StandardException.java) 
              at org.apache.derby.iapi.error.StandardException.newException(StandardException.java) 
              at org.apache.derby.impl.sql.catalog.SequenceUpdater.tooMuchContentionException(SequenceUpdater.java) 
              at org.apache.derby.impl.sql.catalog.SequenceUpdater.getCurrentValueAndAdvance(SequenceUpdater.java) 
              at org.apache.derby.impl.sql.catalog.DataDictionaryImpl.getCurrentValueAndAdvance(DataDictionaryImpl.java) 
              at org.apache.derby.impl.sql.execute.BaseActivation.getCurrentValueAndAdvance(BaseActivation.java) 
              at org.apache.derby.impl.sql.execute.InsertResultSet.getSetAutoincrementValue(InsertResultSet.java) 
              at org.apache.derby.impl.sql.execute.BaseActivation.getSetAutoincrementValue(BaseActivation.java) 
              at org.apache.derby.exe.ac560740aax015fx6bc1x68cax000002339e626a.e0(ac560740aax015fx6bc1x68cax000002339e626a.java) 
              at org.apache.derby.impl.services.reflect.DirectCall.invoke(DirectCall.java) 
              at org.apache.derby.impl.sql.execute.RowResultSet.getNextRowCore(RowResultSet.java) 
              at org.apache.derby.impl.sql.execute.NormalizeResultSet.getNextRowCore(NormalizeResultSet.java) 
              at org.apache.derby.impl.sql.execute.DMLWriteResultSet.getNextRowCore(DMLWriteResultSet.java) 
              at org.apache.derby.impl.sql.execute.InsertResultSet.getNextRowCore(InsertResultSet.java) 
              at org.apache.derby.impl.sql.execute.InsertResultSet.open(InsertResultSet.java) 
              at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(GenericPreparedStatement.java) 
              at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java) 
              ... 25 more 
      

      It is not clear to me why when looking at the code this should be happening.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                sits David Sitsky
              • Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: