Skip to content

[POOL-419] Add failing tests for POOL-419.#385

Closed
rajucomp wants to merge 0 commit intoapache:masterfrom
rajucomp:master
Closed

[POOL-419] Add failing tests for POOL-419.#385
rajucomp wants to merge 0 commit intoapache:masterfrom
rajucomp:master

Conversation

@rajucomp
Copy link

@rajucomp rajucomp commented Feb 3, 2025

Thanks for your contribution to Apache Commons! Your help is appreciated!

Before you push a pull request, review this list:

  • Read the contribution guidelines for this project.
  • Run a successful build using the default Maven goal with mvn; that's mvn on the command line by itself.
  • Write unit tests that match behavioral changes, where the tests fail if the changes to the runtime are not applied. This may not always be possible but is a best-practice.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Each commit in the pull request should have a meaningful subject line and body. Note that commits might be squashed by a maintainer on merge.

@rajucomp
Copy link
Author

rajucomp commented Feb 3, 2025

Hi ggregory. Hope you are well. I really thought about your comment last year to focus on bug fixes. I have tried my best.

I have created a PR at #385.

  1. The PR adds a test to demonstrate that the value of getMaxActive can be a negative number.
  2. The PR also proposes a solution to fix this issue.

During my debugging, I found that when the returned objects were being added back to the set of the idle objects, there was a possibility where they could have been invalidated by another thread leading to invalid objects being added back to the pool which is not desirable.

I am eager to know you critical thoughts on this. Thanks!

@rajucomp
Copy link
Author

rajucomp commented Feb 4, 2025

@garydgregory Requesting a review. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant