openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Heath Thomann (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OPENJPA-1376) @SequenceGenerator allocationSize incorrect implementation
Date Wed, 14 Sep 2011 17:15:09 GMT

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

Heath Thomann commented on OPENJPA-1376:
----------------------------------------

Hello Milosz!!  Excellent catch!!  Thank you!  If you would please, could you double check
my work here to make sure we are on the same page?  That is, in 1.2.x and 1.3.x, it looks
like my changes to DBDictionary are correct.  However, looking at the DBDictionary changes
in 2.0.x and 2.1.x, I forgot to remove this 'if' block:

 if (seq.getIncrement() > 1)

           buf.append(" INCREMENT BY ").append(seq.getIncrement()); 

Sound correct or am I still missing something?

> @SequenceGenerator allocationSize incorrect implementation
> ----------------------------------------------------------
>
>                 Key: OPENJPA-1376
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1376
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: competitive, jdbc, performance
>    Affects Versions: 1.2.1, 2.0.0-M3, 2.1.0
>         Environment: All
>            Reporter: Yves
>            Assignee: Milosz Tylenda
>             Fix For: 1.2.3, 1.3.0, 2.0.2, 2.1.2, 2.2.0
>
>         Attachments: cache-native-seq-values.diff
>
>   Original Estimate: 8h
>  Remaining Estimate: 8h
>
> OpenJpa use allocationSize parameter on NativeJDBCSeq to set the sequence cache value.
> But one "JSR 220: Enterprise JavaBeansTM,Version 3.0" , the allocationSize is : "The
amount to increment by when allocating sequence
> numbers from the sequence."
> Allocating is used to limit the number of access to the sequence or table not to set
the sequence cache value !
> If allocationSize=50, the sequence need to be call one time on each 50 call on AbstractJDBCSeq.next().
> 1 call on AbstractJDBCSeq.next(). call the sequence or table 
> 2 call : return previous value + 1;
> 3 call : return previous value + 2;
> ...
> 51 call :re-call the sequence
> 52 return previous value + 1
> ...

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message