Issue Details (XML | Word | Printable)

Key: POOL-75
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Unassigned
Reporter: Gordon Mohr
Votes: 6
Watchers: 4
Operations

If you were logged in you would be able to see more operations.
Commons Pool

[pool] GenericObjectPool not FIFO with respect to borrowing threads

Created: 16/May/06 07:42 AM   Updated: 17/May/09 11:23 PM
Return to search
Component/s: None
Affects Version/s: Nightly Builds
Fix Version/s: 1.5

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works java.patch 2007-12-25 11:08 AM Takayuki Kaneko 13 kB
Text File Licensed for inclusion in ASF works java2.patch 2008-02-07 02:50 AM Takayuki Kaneko 11 kB
Text File Licensed for inclusion in ASF works java3.patch 2008-02-24 04:29 PM Takayuki Kaneko 12 kB
Text File Licensed for inclusion in ASF works java4.patch 2008-04-02 06:39 AM Takayuki Kaneko 13 kB
Image Attachments:

1. ctest.fairness.png
(7 kB)

2. ctest.original.png
(16 kB)
Environment:
Operating System: All
Platform: All
Issue Links:
Blocker
 

Bugzilla Id: 39590
Resolution Date: 17/May/09 11:23 PM


 Description  « Hide
GenericObjectPool has recently been made FIFO with respect to the managed pool
objects – however, it is still not FIFO with respect to threads requesting
those objects. Specifically, because standard non-fair Java synchronization
monitors are used, later threads may barge ahead of earlier threads that are
already waiting for a pool object to become available. At its extreme, some
threads can cycle objects through the pool many times while others wait
interminable.

Not every application needs FIFO fairness with respect to threads, and such
fairness implies an overhead, so it need not be the default behavior, but it
would be a valuable option where many threads are sharing a smaller number of
pool objects.

I can submit a FairGenericObjectPool which achieves thread-fairness; it only
requires small changes to GenericObjectPool which allow some subclass overriding.



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
No work has yet been logged on this issue.