baldwk opened a new pull request, #456:
URL: https://github.com/apache/commons-pool/pull/456

   When in-flight factory calls fill a key's creation capacity, 
`GenericKeyedObjectPool.create` can keep looping after a positive wait budget 
expires. Once the remaining duration is negative, the loop skips `wait` without 
setting `create` to false, which can cause busy-spinning until capacity becomes 
available.
   
   Add an expiry check for initially positive creation-wait budgets and use the 
existing cleanup path to release the reservation against `maxTotal`. Explicit 
zero and negative duration handling, all call sites, and the existing duration 
documentation are unchanged.
   
   Follow-up to [POOL-420](https://issues.apache.org/jira/browse/POOL-420), 
targeting `POOL_2_X`.
   
   The regression holds one factory call open with a latch and requires a 
second borrow with a 100 ms budget to time out before that factory call is 
released. It also verifies that the timed-out borrower leaves global capacity 
available to another key. The equivalent positive-budget case fails without the 
fix because the borrower does not finish within the two-second guard.
   
   Validation:
   - Targeted regression and existing max-wait tests: 3 tests passed on JDK 21.
   - Checkstyle: passed with no violations.
   - Full default Maven build: 405 tests, 0 failures, 0 errors, 12 existing 
disabled tests. RAT, Checkstyle and japicmp completed successfully. The build 
stopped at a transient TLS error fetching an external Javadoc link; a 
subsequent `mvn javadoc:javadoc` passed.
   - `mvn pmd:cpd-check`: passed.
   - SpotBugs and PMD: findings match the unmodified upstream base described 
below.
   - The default build did not produce JaCoCo execution data, so its coverage 
check was skipped by the existing configuration.
   
   On the unmodified `POOL_2_X` base (`a0c13d55`), SpotBugs reports three 
`IS2_INCONSISTENT_SYNC` findings on `BaseGenericObjectPool.evictionIterator`, 
`GenericKeyedObjectPool.evictionKey`, and `evictionKeyIterator`; PMD also 
reports the unused `BaseGenericObjectPool.closeLock` field. The narrowed patch 
produces exactly the same findings.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to