Derby
  1. Derby
  2. DERBY-5623

Loosen up synchronization in FileMonitor

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 10.8.2.2
    • Fix Version/s: 10.9.1.0
    • Component/s: Services
    • Labels:
      None
    • Bug behavior facts:
      Performance

      Description

      When opening a large number of databases in parallel, many threads get stuck for a long time in FileMonitor, as reported in this thread on derby-user:
      http://mail-archives.apache.org/mod_mbox/db-derby-user/201202.mbox/%3CCAEQ8c00vx0yFrwWyjm%3Dt_Yd%2BuuKGOL%3DSgpYfQuYghOOPgdN8-w%40mail.gmail.com%3E

      The synchronization in FileMonitor is only needed because the monitor instance is also used as a shared PrivilegedExceptionAction instance. Since all databases share one FileMonitor instance, threads that access any of these methods are serialized. If each method created its own PrivilegedAction or PrivilegedExceptionAction instance instead of using the monitor's run() method, these methods wouldn't need synchronization.

      1. derby-diff.txt
        9 kB
        David Sitsky
      2. d5623-1.diff
        8 kB
        Knut Anders Hatlen

        Activity

        Gavin made changes -
        Workflow jira [ 12654025 ] Default workflow, editable Closed status [ 12796934 ]
        Knut Anders Hatlen made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Knut Anders Hatlen made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Knut Anders Hatlen [ knutanders ]
        Fix Version/s 10.9.0.0 [ 12316344 ]
        Resolution Fixed [ 1 ]
        Knut Anders Hatlen made changes -
        Attachment d5623-1.diff [ 12515341 ]
        David Sitsky made changes -
        Field Original Value New Value
        Attachment derby-diff.txt [ 12515325 ]
        Knut Anders Hatlen created issue -

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development