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

GKOP: invalidateObject does not unblock threads waiting in borrowObject

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.1
    • Labels:
      None

      Description

      It appears that when threads are blocked in GKOP.borrowObject due to max object limits being reached and another thread calls invalidateObject, the threads blocked in GKOP.borrowObject are not woken up to attempt to create a new object.

      Have the semantics changed for invalidate in 2.0?

      Attached is a unit test that demonstrates this issue. I should note that this test passed against POOL 1.5, after making the appropriate changes due to the API changes in 2.0.

      After a cursory glance through the source for GenericObjectPool, it looks like it might be affected by the same issue.

        Attachments

        1. InvalidateObjectTest.java
          3 kB
          Dan McNulty

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              dan.mcnulty Dan McNulty
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: