Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-12686

Race condition when starting up the Ofbiz Sequence Generator

    XMLWordPrintable

Details

    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

          Activity

            People

              jed Jed Wesley-Smith (Inactive)
              jed Jed Wesley-Smith (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: