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

List.add(int,Object) is inefficient in default mappings

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 0.9.0, 0.9.6, 0.9.7, 1.0.0
    • None
    • None
    • None

    Description

      From users@openjpa.apache.org:

      When List.add(index, object) is being used
      OpenJPA sends the following sql statement, so the order of the elements can
      be built up from scratch:
      "Delete from RELATION_TABLE where ID = ?"

      In ms sql server this causes an exclusive lock on the entire table which of
      course easily introduces blocking issues (long running transactions having a
      shared lock or other client who like to insert objects in their list as
      well).

      List.add(Object) does not have this behaviour so when adding objects to the
      end of the list it is always better to use this method.

      Attachments

        1. OPENJPA-411.patch
          0.7 kB
          Patrick Linskey

        Activity

          People

            Unassigned Unassigned
            pcl Patrick Linskey
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: