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

Rick Hillegas updated DERBY-5493:
---------------------------------

    Attachment: derby-5493-01-af-usersubtran.diff

Attaching derby-5493-01-af-usersubtran.diff. This patch fixes the concurrency 
problems with the previous patch which were disclosed by the experiments 
described on DERBY-5471.

The fix is to go back to updating SYSSEQUENCES in a subtransaction of the 
user's execution transaction. This means that this patch does not fix 
DERBY-5494. So I won't commit this patch until Mike commits his work on 
DERBY-5494. At that point, I will adjust the patch to account for the fact that 
Mike is going to include the regression test case for that issue which was 
introduced by the earlier rev of this patch.

With this version of the patch the tx/sec results are slightly better than the 
comparable experiments on 10.8.2.2 and trunk:

o 10 threads with preallocation=20: 99 vs 92 on trunk

o 10 threads with preallocation=5: 78 vs 75 on 10.8.2.2

o 1 thread with preallocation=20: 45 vs 44 on trunk

o 1 thread with preallocation=5: 36 vs 35 on 10.8.2.2

                
> Same value returned by successive calls to a sequence generator.
> ----------------------------------------------------------------
>
>                 Key: DERBY-5493
>                 URL: https://issues.apache.org/jira/browse/DERBY-5493
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.6.1.0, 10.6.2.1, 10.7.1.1, 10.8.1.2, 10.8.2.2, 
> 10.9.0.0
>            Reporter: Rick Hillegas
>            Assignee: Rick Hillegas
>              Labels: derby_triage10_9
>         Attachments: derby-5493-01-aa-correctnessPlusPeekerPlusTest.diff, 
> derby-5493-01-ad-simplerApproach.diff, 
> derby-5493-01-ae-simplerApproachWithCrashJUnitTest.diff, 
> derby-5493-01-af-usersubtran.diff
>
>
> The following script shows the same value being returned from a sequence 
> generator by two successive NEXT VALUE FOR calls. Thanks to Knut for finding 
> this:
> connect 'jdbc:derby:memory:db;create=true';
> create table t (x int);
> create sequence s;
> autocommit off;
> select count(*) from sys.syssequences with rs;
> values next value for s;
> drop table t;
> rollback;
> -- same value as previous call
> values next value for s; 

--
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

        

Reply via email to