[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2928) optimizers for enhanced id generators should be synchronized against multi-threaded access
Laszlo Sas (JIRA)
noreply at atlassian.com
Mon Feb 22 06:37:48 EST 2010
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2928?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=35660#action_35660 ]
Laszlo Sas commented on HHH-2928:
---------------------------------
Optimizers are not thread-safe. (Used version core 3.3.2)
NoopOptimizer:
1) public Serializable generate(AccessCallback callback) must be synchronized.
Fix: public synchronized Serializable generate(AccessCallback callback)
2) public long getLastSourceValue()
Fix: public synchronized long getLastSourceValue()
HiLoOptimizer:
1) public long getLastSourceValue()
Fix: public synchronized long getLastSourceValue()
2) public long getLastValue()
Fix: public synchronized long getLastValue()
3) public long getHiValue()
Fix: public synchronized long getHiValue()
PooledOptimizer:
1) public long getLastSourceValue()
Fix: public synchronized long getLastSourceValue()
2) public long getLastValue()
Fix: public synchronized long getLastValue()
Would you be so kind as to apply these modifications?
Thanks,
Laszlo
> optimizers for enhanced id generators should be synchronized against multi-threaded access
> ------------------------------------------------------------------------------------------
>
> Key: HHH-2928
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2928
> Project: Hibernate Core
> Issue Type: Bug
> Components: core
> Affects Versions: 3.2.5
> Reporter: Steve Ebersole
> Assignee: Steve Ebersole
> Fix For: 3.2.6, 3.3.0.CR1
>
> Attachments: NoopOptimizerTest.java, NoopOptimizerTest.java, NoopRaceConditionTest.java
>
>
> Currently the optimizers do not serialize access to their internal state when applying their optimizations. This only affects the pooled and hilo optimizers.
--
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