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

[pool] Number of tested objects in eviction runs of GenericObjectPool

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.2
    • 1.3
    • None
    • Operating System: All
      Platform: All

    • 33265

    Description

      Hi,

      if numTestsPerEvictionRun is set to n and there are less than n idle objects in
      the pool, the evictor thread will still make n tests on these objects in a
      round-robin manner, i.e. idle objects can be tested more than once per eviction
      run. As this also includes validity tests if testWhileIdle is enbabled and
      validity tests may be time-consuming, this is a rather unwanted behavior.

      Instead of testing getNumTests() objects, the pool should test
      min(_pool.size(),getNumTests()) objects per eviction run.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              thomas@schuerger.com Thomas Schürger
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: