Details
-
Bug
-
Resolution: Fixed
-
Medium
-
None
-
None
Description
If JIRA is started up and the first thing it is asked to do is to concurrently generate sequences of the same table, a race condition can occur that causes the sequence generation to fail.
The following is logged:
2007-05-04 12:28:19,885 indexerPool-1-thread-2 ERROR [ofbiz.core.entity.SequenceUtil] [SequenceUtil.SequenceBank.fillBank] maxTries (5) reached, giving up. 2007-05-04 12:28:19,885 indexerPool-1-thread-2 ERROR [ofbiz.core.entity.SequenceUtil] [SequenceUtil.SequenceBank.getNextSeqId] Fill bank failed, returning null
The cause is that the SequenceBank.fillBank() is called from the constructor of the SequenceBank before it is assigned to the map, so multiple SequenceBanks for the same sequence can be created - and they tend to get in each other's way. Solution is to synchronise the construction of the SequenceBanks.
Attachments
Issue Links
- relates to
-
JRASERVER-20289 Race condition when creating many custom fields
- Closed