Uploaded image for project: 'Commons Pool'
  1. Commons Pool
  2. POOL-158

References to GenericKeyedObjectPool._minIdle are not always synchronized

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.2, 1.4, 1.5, 1.5.1, 1.5.2, 1.5.3, 1.5.4
    • 1.5.5
    • None

    Description

      References to GenericKeyedObjectPool._minIdle are not always synchronized:

      The ensureMinIdle() and evict() methods both access the field outside the synch. block.
      This is particularly bad as they are called from the timer thread.

      The references could use getMinIdle(), which is synch., or it would probably be cheaper to move the references into the synch. blocks.

      Better yet, can the field be made final? setMinIdle() is currently only called from Test cases and setConfig() which is not referenced AFAICT.

      Attachments

        Activity

          People

            Unassigned Unassigned
            sebb Sebb
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: