Skip to content
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

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

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!

… pool, we must check whether it is already deallocated.
@rajucomp rajucomp reopened this Feb 3, 2025
rajucomp and others added 5 commits February 3, 2025 23:24
…bject is not invalid before returning back to the pool.
…bject is not invalid before returning back to the pool.
…bject is not invalid before returning back to the pool.
…bject is not invalid before returning back to the pool.
@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