Uploaded image for project: 'FORTRESS'
  1. FORTRESS
  2. FC-38

Potential issues on synchronized protected elements

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 1.0.0-RC39
    • 1.0.0-RC42
    • None

    Description

      There are some classes where we protect a field with a synchronized in order to avoid concurrent modifications. That's ok, except that one should not access the field while it's being updated. There are a few cases where it's done, and this should be fixed.

      The way to do it is to use ReentrantReadWriteLock for that : it allows concurrent reads, unless a write lock is taken. Writes will block other writes and all the reads until it's done.

      The OrgUnitP and PolicyP are protecting sets while updating it that aren't protected when read (this is fixed for OrgUnitP)

      The AdminRoleUtil, HierUtil, PsoUtil, UsoUtil are all manipulating a graph object which is synchronized on update, but not on read. This is probably more complex to fix than for the OrgUnitP/PolicyP classes.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              elecharny Emmanuel Lécharny
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: