db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Hillegas (Updated) (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DERBY-5448) In the 10.8 branch, back out the concurrency improvements introduced by using SequenceUpdaters to allocate identity values.
Date Thu, 06 Oct 2011 16:01:30 GMT

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

Rick Hillegas updated DERBY-5448:
---------------------------------

    Attachment: derby-5448-01-aa-backoutConcurrencyChanges.diff

Attaching derby-5448-01-aa-backoutConcurrencyChanges.diff. Regression tests ran cleanly for
me against this patch. This patch backs out the following ports to the 10.8 branch and reverts
10.8 to the old style of identity generation:

DERBY-4437 1141645: This is the master commit which ported most of the 10.9 changes to 10.8

DERBY-4437 1142052: This commit ported an upgrade test from 10.9 to 10.8. The test verifies
the new identity behavior.

DERBY-5408 1170178: This commit ported the localization fixes for the 2200H message from 10.9
to the 10.8 branch.

DERBY-5426 1174297: This commit ported some SequenceUpdater changes from 10.9 to the 10.8
branch. The changes improved the error reporting when there was too much contention on an
identity column. 

-----------------------------

I still see deadlocks in NsTest after applying this patch. However, the deadlocks do not involve
identity generation as far as I can tell. I don't know enough about NsTest to say whether
these deadlocks warrant additional investigation before building a new 10.8.2 release candidate.
Here is the deadlock cycle I see now:

java.sql.SQLTransactionRollbackException: A lock could not be obtained due to a deadlock,
cycle of locks and waiters is:
Lock : ROW, NSTESTTAB, (605,25)
  Waiting XID : {98562, S} , NSTEST, select max(serialkey) from nstesttab where serialkey
> ?
  Granted XID : {98556, X} 
Lock : ROW, NSTESTTAB, (605,29)
  Waiting XID : {98556, S} , NSTEST, select max(serialkey) from nstesttab where serialkey
> ?
Lock : ROW, NSTESTTAB, (605,29)
  Waiting XID : {98530, X} , NSTEST,  update nstesttab set t_char = ?  where serialkey = 36733
Lock : ROW, NSTESTTAB, (605,29)
  Waiting XID : {98571, X} , NSTEST,  update nstesttab set t_double = ?  where serialkey =
36733
Lock : ROW, NSTESTTAB, (605,29)
  Waiting XID : {98536, X} , NSTEST,  update nstesttab set t_timestamp = ?  where serialkey
= 36733
Lock : ROW, NSTESTTAB, (605,29)
  Waiting XID : {98509, X} , NSTEST,  delete from nstesttab where serialkey = ?
Lock : ROW, NSTESTTAB, (605,29)
  Waiting XID : {98533, X} , NSTEST,  delete from nstesttab where serialkey = ?
  Granted XID : {98516, X} 
Lock : ROW, NSTESTTAB, (605,25)
  Waiting XID : {98516, S} , NSTEST, select max(serialkey) from nstesttab where serialkey
> ?
Lock : ROW, NSTESTTAB, (605,25)
  Waiting XID : {98576, X} , NSTEST,  update nstesttab set t_longint = ?  where serialkey
= 36729
. The selected victim is XID : 98562.

-----------------------------

Touches the following files:

M       java/storeless/org/apache/derby/impl/storeless/EmptyDictionary.java
M       java/engine/org/apache/derby/impl/sql/compile/CreateSequenceNode.java
M       java/engine/org/apache/derby/impl/sql/compile/NextSequenceNode.java
M       java/engine/org/apache/derby/impl/sql/execute/InsertResultSet.java
M       java/engine/org/apache/derby/impl/sql/execute/BaseActivation.java
M       java/engine/org/apache/derby/impl/sql/execute/InsertConstantAction.java
M       java/engine/org/apache/derby/impl/sql/catalog/SequenceGenerator.java
M       java/engine/org/apache/derby/impl/sql/catalog/DataDictionaryImpl.java
D       java/engine/org/apache/derby/impl/sql/catalog/SequenceRange.java
M       java/engine/org/apache/derby/impl/sql/catalog/SequenceUpdater.java
M       java/engine/org/apache/derby/impl/db/BasicDatabase.java
M       java/engine/org/apache/derby/iapi/sql/dictionary/DataDictionary.java
M       java/engine/org/apache/derby/iapi/sql/dictionary/SequenceDescriptor.java
M       java/engine/org/apache/derby/iapi/reference/Property.java
D       java/engine/org/apache/derby/catalog/SequencePreallocator.java
M       java/engine/org/apache/derby/loc/messages_de_DE.properties
M       java/engine/org/apache/derby/loc/messages_ko_KR.properties
M       java/engine/org/apache/derby/loc/messages_fr.properties
M       java/engine/org/apache/derby/loc/messages_es.properties
M       java/engine/org/apache/derby/loc/messages_it.properties
M       java/engine/org/apache/derby/loc/messages_ja_JP.properties
M       java/engine/org/apache/derby/loc/messages.xml
M       java/engine/org/apache/derby/loc/messages_zh_TW.properties
M       java/shared/org/apache/derby/shared/common/reference/SQLState.java
M       java/testing/org/apache/derbyTesting/functionTests/tests/lang/AlterTableTest.java
M       java/testing/org/apache/derbyTesting/functionTests/tests/lang/AutoIncrementTest.java
D       java/testing/org/apache/derbyTesting/functionTests/tests/lang/t_4437_2.dat
M       java/testing/org/apache/derbyTesting/functionTests/tests/lang/SequenceGeneratorTest.java
M       java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/UpgradeRun.java
D       java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/Changes10_8_2.java
M       java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/UpgradeChange.java
M       tools/javadoc/publishedapi.ant

                
> In the 10.8 branch, back out the concurrency improvements introduced by using SequenceUpdaters
to allocate identity values.
> ---------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5448
>                 URL: https://issues.apache.org/jira/browse/DERBY-5448
>             Project: Derby
>          Issue Type: Bug
>          Components: Documentation, SQL
>    Affects Versions: 10.8.2.1
>            Reporter: Rick Hillegas
>         Attachments: derby-5448-01-aa-backoutConcurrencyChanges.diff
>
>
> New errors were seen while running NsTest against the 10.8.2 release candidates. These
errors are recorded as DERBY-5430 and DERBY-5422. The first error is a deadlock which occurs
when inserting into the main table of the test. The second error is a problem clearing the
identity cache. These errors have caused people to lose confidence in the concurrency improvements
introduced by DERBY-4437. We should back the DERBY-4437 changes out of the 10.8 branch and
use the trunk to continue debugging the problems disclosed by NsTest.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message