[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2928?page=c...
]
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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira