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

maxActive can be exceeded by one

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.2
    • Fix Version/s: 1.4
    • Labels:
      None

      Description

      For GenericObjectPool, when numIdle > 0 and the idle object evictor is set to run (timeBetweenEvictionRunsMillis > 0), a race condition can occur between the Evictor and a borrowing thread, wherein the Evictor initiates a makeObject in ensureMinIdle and before the newly created object is placed in the pool, the borrowing thread initiates another makeObject that makes the number of instances in circulation = maxActive + 1.

      This issue does not affect pool 1.3, since addObject is syncrhonized in that version. It does affect 1.4-RC1 (unreleased snapshot) and the code currently in the 1.4 release branch.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              psteitz Phil Steitz
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: