-
Notifications
You must be signed in to change notification settings - Fork 298
Add failing tests to reproduce POOL-413 #453
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: POOL_2_X
Are you sure you want to change the base?
Conversation
|
@garydgregory Could you run the pipelines please ? I have added some comments on the JIRA about the fix. Would appreciate your feedback. Thanks@ |
|
@rajucomp Please rebase on git master. |
aa7a1fa to
3a1c32a
Compare
|
@garydgregory Done. Please run the pipelines. Thanks! |
|
This is weird. The test fails when run in isolation but passes when the whole test suite is run. Let me see how to reproduce the failure reliably. |
|
@garydgregory Could you trigger the pipelines again ? |
Thanks for your contribution to Apache Commons! Your help is appreciated!
Before you push a pull request, review this list:
mvn; that'smvnon the command line by itself.In a
GenericObjectPoolit is possible to configure a maximum number of idle objects to be kept by the pool while they are not in use.In unfortunate circumstances, if several threads return an object to the pool at the same time, the check on the maximum number of idle objects may be dismissed. This results in the pool keeping more idle objects than configured.
Looking into the source code of the
returnObjectmethod of theGenericObjectPool, it seems that there is no synchronization between the moment the check is made for themaxIdleconfiguration and the moment the object is destroyed:The PR contains the test to demonstrate the failure. A fix is ready for the same. Once the maintainer confirm the bug, a seperate PR for the fix will be raised.