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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.1, 2.0.0-M3
    • Fix Version/s: 2.0.2, 2.1.0
    • Component/s: jdbc, kernel
    • Labels:
      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.

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

        Issue Links

          Activity

          Hide
          mikedd Michael Dick added a comment -

          Closing issue which has been resolved for some time. If you believe the issue is not resolved please reopen or open a new issue.

          Show
          mikedd Michael Dick added a comment - Closing issue which has been resolved for some time. If you believe the issue is not resolved please reopen or open a new issue.
          Hide
          mikedd Michael Dick added a comment -

          Testcase added to 2.x releases - so I'm marking as resolved. If there's another way to trigger this problem we can either open another issue (if 2.0.2 or 2.1.0 have been released), or reopen this one (if neither has been released).

          Show
          mikedd Michael Dick added a comment - Testcase added to 2.x releases - so I'm marking as resolved. If there's another way to trigger this problem we can either open another issue (if 2.0.2 or 2.1.0 have been released), or reopen this one (if neither has been released).

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development