Derby
  1. Derby
  2. DERBY-2149

Replace Vectors and Hashtables with ArrayLists and HashMaps in RAMTransaction

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 10.3.1.4
    • Fix Version/s: 10.3.1.4
    • Component/s: Store
    • Labels:
      None
    • Bug behavior facts:
      Performance

      Description

      In org.apache.derby.impl.store.access.RAMTransaction, synchronized collection objects could be replaced with unsynchronized ones. See discussion here: http://www.nabble.com/Use-of-synchronized-containers-in-engine-code-tf2754469.html

      1. derby-2149-1a.diff
        12 kB
        Knut Anders Hatlen
      2. derby-2149-1b.diff
        12 kB
        Knut Anders Hatlen

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        9d 22h 48m 1 Knut Anders Hatlen 15/Dec/06 13:53
        In Progress In Progress Closed Closed
        17d 20h 25m 1 Knut Anders Hatlen 02/Jan/07 10:18
        Gavin made changes -
        Workflow jira [ 12391559 ] Default workflow, editable Closed status [ 12800722 ]
        Dag H. Wanvik made changes -
        Derby Categories [Performance]
        Dag H. Wanvik made changes -
        Component/s Performance [ 11709 ]
        Knut Anders Hatlen made changes -
        Status In Progress [ 3 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]
        Derby Info [Patch Available]
        Fix Version/s 10.3.0.0 [ 12310800 ]
        Hide
        Knut Anders Hatlen added a comment -

        Committed revision 491769.

        Show
        Knut Anders Hatlen added a comment - Committed revision 491769.
        Knut Anders Hatlen made changes -
        Derby Info [Patch Available]
        Knut Anders Hatlen made changes -
        Attachment derby-2149-1b.diff [ 12347321 ]
        Hide
        Knut Anders Hatlen added a comment -

        Uploading a new patch. The problem with the previous one was a mix-up of two variable names. Have run derbyall and the JUnit tests with one failure in store/readlocks.sql (diff similar to http://www.multinet.no/~solberg/public/Apache/Derby/testlog/Linux-2.4.21-27.ELsmp_i686-i686/240441-storeall_diff.txt).

        Show
        Knut Anders Hatlen added a comment - Uploading a new patch. The problem with the previous one was a mix-up of two variable names. Have run derbyall and the JUnit tests with one failure in store/readlocks.sql (diff similar to http://www.multinet.no/~solberg/public/Apache/Derby/testlog/Linux-2.4.21-27.ELsmp_i686-i686/240441-storeall_diff.txt ).
        Knut Anders Hatlen made changes -
        Derby Info [Patch Available]
        Hide
        Knut Anders Hatlen added a comment -

        I reran the JUnit tests and got two failures in the nist suite. They seem related to the patch, so I'm removing the patch available flag for now. Will investigate the failures later.

        Show
        Knut Anders Hatlen added a comment - I reran the JUnit tests and got two failures in the nist suite. They seem related to the patch, so I'm removing the patch available flag for now. Will investigate the failures later.
        Knut Anders Hatlen made changes -
        Derby Info [Patch Available]
        Knut Anders Hatlen made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Knut Anders Hatlen made changes -
        Assignee Knut Anders Hatlen [ knutanders ]
        Knut Anders Hatlen made changes -
        Field Original Value New Value
        Attachment derby-2149-1a.diff [ 12347279 ]
        Hide
        Knut Anders Hatlen added a comment -

        The attached patch replaces four Vectors and one Hashtable in RAMTransaction with ArrayLists and a HashMap. According to the discussion on derby-dev, it is safe to assume single-threaded access in RAMTransaction. Please let me know if there are cases where this assumption is incorrect. Derbyall and the JUnit tests ran cleanly with the patch applied.

        Show
        Knut Anders Hatlen added a comment - The attached patch replaces four Vectors and one Hashtable in RAMTransaction with ArrayLists and a HashMap. According to the discussion on derby-dev, it is safe to assume single-threaded access in RAMTransaction. Please let me know if there are cases where this assumption is incorrect. Derbyall and the JUnit tests ran cleanly with the patch applied.
        Knut Anders Hatlen created issue -

          People

          • Assignee:
            Knut Anders Hatlen
            Reporter:
            Knut Anders Hatlen
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development