Derby
  1. Derby
  2. DERBY-4947

Missing/broken synchronization in BasicDependencyManager.getDependents()

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 10.8.1.2
    • Fix Version/s: 10.8.1.2
    • Component/s: SQL
    • Labels:
      None
    • Bug behavior facts:
      Regression Test Failure

      Description

      The method getDependents(Provider) in BasicDependencyManager isn't using proper synchronization in cases where a list has to be compiled by combining in-memory and on-disk dependencies. Returning a reference to the list obtained from the shared map is also a bug.
      The test lang.XplainStatisticsTest.testSimpleQueryMultiWithInvalidation failed due to this issue (see [1]).

      [1] http://dbtg.foundry.sun.com/derby/test/Daily/jvm1.5/testing/testlog/lin/1050670-suitesAll_diff.txt

        Issue Links

          Activity

          Hide
          Kristian Waagan added a comment -

          Attaching patch 1a, which addresses the issue much in the same way as getProviders (creates a copy of the list).

          Regression tests passed.
          Patch ready for review.

          Show
          Kristian Waagan added a comment - Attaching patch 1a, which addresses the issue much in the same way as getProviders (creates a copy of the list). Regression tests passed. Patch ready for review.
          Hide
          Kristian Waagan added a comment -

          Added link to DERBY-4928, which introduced this bug (I assume it is new, although the failing test is also rather new and is only failing intermittently).

          Show
          Kristian Waagan added a comment - Added link to DERBY-4928 , which introduced this bug (I assume it is new, although the failing test is also rather new and is only failing intermittently).
          Hide
          Knut Anders Hatlen added a comment -

          Moving the copying of the list into the synchronized block looks like a correct fix to me. +1 to commit.

          Show
          Knut Anders Hatlen added a comment - Moving the copying of the list into the synchronized block looks like a correct fix to me. +1 to commit.
          Hide
          Kristian Waagan added a comment -

          Thanks, Knut.

          Committed patch 1a to trunk with revision 1051271.

          Show
          Kristian Waagan added a comment - Thanks, Knut. Committed patch 1a to trunk with revision 1051271.
          Hide
          Kristian Waagan added a comment -

          Closing issue.

          Show
          Kristian Waagan added a comment - Closing issue.

            People

            • Assignee:
              Kristian Waagan
              Reporter:
              Kristian Waagan
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development