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

Return with testOnBorrow set

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 2.4.2
    • Fix Version/s: None
    • Labels:
      None

      Description

      On call to GenericKeyedObjectPool.returnObject() with testOnReturn set, when there are blocked GenericKeyedObjectPool.borrowObject() calls, I expect the blocked calls to unblock if returning this object successfully would free up a slot.

      Instead, returnObject() exits without checking for pending borrowObject()'s.

      This can result in a hung / timed out request despite the necessary resources to fill the request being available.

      if (getTestOnReturn()) {
      if (!factory.validateObject(key, p))

      { // blah blah blah return; }

      }

      // blah blah blah
      if (hasBorrowWaiters())

      { reuseCapacity(); // Never get here because we returned up above. }

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                tbroberg Tim Broberg
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: