Uploaded image for project: 'OpenJPA'
  1. OpenJPA
  2. OPENJPA-1372

Generating identifiers by using sequence table may fail during sequence table initialization

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.2.1, 2.0.0-M3
    • 2.0.2, 2.1.0
    • jdbc, kernel
    • None

    Description

      When sequence table does not exist and mutliple threads get EntityManagers from EntityManageFactory, an insert into sequence table may fail because of duplicate primary key value.

      EMF is created lazily by default and users reported various problems with concurrent initialization (e.g. failures in resolving aliases in JPQL queries, IIRC) of EMF. This issue might have the same roots.

      Issue and test case originally reported by Pinaki in OPENJPA-466.

      Attachments

        1. TestSequenceGenerationOnMT.java
          2 kB
          Milosz Tylenda
        2. GeneratedIdObject.java
          0.5 kB
          Milosz Tylenda

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            mikedd Michael Dick
            milosz Milosz Tylenda
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment