[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3407) @TableGenerator does not increment pkColumnValue by allocationSize
Brett Wooldridge (JIRA)
noreply at atlassian.com
Tue Sep 7 22:25:18 EDT 2010
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3407?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=38322#action_38322 ]
Brett Wooldridge commented on HHH-3407:
---------------------------------------
This is a major performance issue for customers using @TableGenerator, how is this not fixed 2 years after opening?
> @TableGenerator does not increment pkColumnValue by allocationSize
> ------------------------------------------------------------------
>
> Key: HHH-3407
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3407
> Project: Hibernate Core
> Issue Type: Bug
> Affects Versions: 3.2.4, 3.2.6
> Environment: JBoss 4.2.3, RHEL4, JDK1.5
> Reporter: Dan Ciarniello
>
> According to the JPA, the allocationSize attribute to @TableGenerator is "The amount to increment by when allocating id numbers from the generator" but the value is actually incremented by 1 regardless of allocationSize. The id is generated properly apparently according to the formula
> id = lastkeyval*allocationSize + i where 0<i<allocationSize
> The problems with this algorithm are:
> 1. One cannot tell what the next key value range is from the key table without knowing the allocationSize (minor)
> 2. If the allocationSize is reduced, already existing key values will be generated (major)
> 3. If two applications are configured with different allocation sizes, there will be an overlap in generated values (major)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list