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

refresh(PESSIMISTIC_WRITE) generates seperate SQL for the lock

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.2, 2.2.1.1, 2.2.3, 2.3.0, 2.4.0
    • Fix Version/s: 2.1.2, 2.2.1.1, 2.2.3, 2.4.0
    • Component/s: jdbc, kernel
    • Labels:
      None
    • Patch Info:
      Patch Available

      Description

      Simple refresh(PESSIMISTIC_WRITE) generates multiple SQL statements. E.g.

      em.refresh(t1, LockModeType.PESSIMISTIC_WRITE);
      //SELECT t0.CMLT_FOLDER_CONTEXT_UPDATE_TMS, t0.CRE_TIME FROM T1 t0 WHERE t0.c1 = ? [params=(String) c1]
      //SELECT t0.c1 FROM T1 t0 WHERE t0.c1 = ? FOR READ ONLY WITH RR USE AND KEEP UPDATE LOCKS [params=(String) c1]

      It would be nice if a single SQL is executed to optimize SQL execution and chances that another thread may compete to lock the same row.

        Issue Links

          Activity

          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 1539200 from Heath Thomann in branch 'openjpa/trunk'
          [ https://svn.apache.org/r1539200 ]

          OPENJPA-2449: refresh(PESSIMISTIC_WRITE) generates seperate SQL for the lock - applied to trunk Albert Lee's patch.

          Show
          jira-bot ASF subversion and git services added a comment - Commit 1539200 from Heath Thomann in branch 'openjpa/trunk' [ https://svn.apache.org/r1539200 ] OPENJPA-2449 : refresh(PESSIMISTIC_WRITE) generates seperate SQL for the lock - applied to trunk Albert Lee's patch.
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 1539199 from Heath Thomann in branch 'openjpa/branches/2.3.x'
          [ https://svn.apache.org/r1539199 ]

          OPENJPA-2449: refresh(PESSIMISTIC_WRITE) generates seperate SQL for the lock - applied to 2.3.x Albert Lee's patch.

          Show
          jira-bot ASF subversion and git services added a comment - Commit 1539199 from Heath Thomann in branch 'openjpa/branches/2.3.x' [ https://svn.apache.org/r1539199 ] OPENJPA-2449 : refresh(PESSIMISTIC_WRITE) generates seperate SQL for the lock - applied to 2.3.x Albert Lee's patch.
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 1539197 from Heath Thomann in branch 'openjpa/branches/2.2.x'
          [ https://svn.apache.org/r1539197 ]

          OPENJPA-2449: refresh(PESSIMISTIC_WRITE) generates seperate SQL for the lock - applied to 2.2.x Albert Lee's patch.

          Show
          jira-bot ASF subversion and git services added a comment - Commit 1539197 from Heath Thomann in branch 'openjpa/branches/2.2.x' [ https://svn.apache.org/r1539197 ] OPENJPA-2449 : refresh(PESSIMISTIC_WRITE) generates seperate SQL for the lock - applied to 2.2.x Albert Lee's patch.
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 1539193 from Heath Thomann in branch 'openjpa/branches/2.2.1.x'
          [ https://svn.apache.org/r1539193 ]

          OPENJPA-2449: refresh(PESSIMISTIC_WRITE) generates seperate SQL for the lock - applied to 2.2.1.x Albert Lee's patch.

          Show
          jira-bot ASF subversion and git services added a comment - Commit 1539193 from Heath Thomann in branch 'openjpa/branches/2.2.1.x' [ https://svn.apache.org/r1539193 ] OPENJPA-2449 : refresh(PESSIMISTIC_WRITE) generates seperate SQL for the lock - applied to 2.2.1.x Albert Lee's patch.
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 1539188 from Heath Thomann in branch 'openjpa/branches/2.1.x'
          [ https://svn.apache.org/r1539188 ]

          OPENJPA-2449: refresh(PESSIMISTIC_WRITE) generates seperate SQL for the lock - applied to 2.1.x Albert Lee's patch.

          Show
          jira-bot ASF subversion and git services added a comment - Commit 1539188 from Heath Thomann in branch 'openjpa/branches/2.1.x' [ https://svn.apache.org/r1539188 ] OPENJPA-2449 : refresh(PESSIMISTIC_WRITE) generates seperate SQL for the lock - applied to 2.1.x Albert Lee's patch.

            People

            • Assignee:
              jpaheath Heath Thomann
              Reporter:
              allee8285 Albert Lee
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development