OpenJPA
  1. OpenJPA
  2. OPENJPA-1372

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

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major 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

          Milosz Tylenda created issue -
          Milosz Tylenda made changes -
          Field Original Value New Value
          Attachment GeneratedIdObject.java [ 12423767 ]
          Attachment TestSequenceGenerationOnMT.java [ 12423768 ]
          Milosz Tylenda made changes -
          Link This issue relates to OPENJPA-466 [ OPENJPA-466 ]
          Milosz Tylenda made changes -
          Link This issue is related to OPENJPA-1765 [ OPENJPA-1765 ]
          Michael Dick made changes -
          Assignee Michael Dick [ mikedd ]
          Hide
          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
          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).
          Michael Dick made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 2.0.2 [ 12315257 ]
          Fix Version/s 2.1.0 [ 12314542 ]
          Resolution Fixed [ 1 ]
          Hide
          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
          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.
          Michael Dick made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Milosz Tylenda made changes -
          Link This issue relates to OPENJPA-2269 [ OPENJPA-2269 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Resolved Resolved
          311d 1h 23m 1 Michael Dick 07/Sep/10 22:49
          Resolved Resolved Closed Closed
          127d 17h 55m 1 Michael Dick 13/Jan/11 16:45

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development