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

BoundedPoolConfig with -1 as maxTotal does not work as unlimited pool #1953

Closed
fedigiorgio opened this issue Jan 3, 2022 · 1 comment
Closed
Labels
type: bug A general bug
Milestone

Comments

@fedigiorgio
Copy link

Bug Report

Current Behavior

When create BoundedPoolConfig with maxTotal = -1 and try to acquire a connection from pool throws java.util.NoSuchElementException: Pool exhausted.

Documentation says:

        /**
         * Configures the maximum number of objects that can be allocated by the pool (checked out to clients, or idle awaiting
         * checkout) at a given time. When negative, there is no limit to the number of objects that can be managed by the pool
         * at one time.
         *
         * @param maxTotal maximum number of objects that can be allocated by the pool.
         * @return {@code this} {@link Builder}.
         */
        public Builder maxTotal(int maxTotal)

Expected behavior/code

To have a Pool able to acquire connections with no limit.

Environment

  • Lettuce version(s): [6.1.5.RELEASE]
  • Redis version: [6.2.3]
@mp911de mp911de added the type: bug A general bug label Jan 4, 2022
@mp911de mp911de changed the title BoundedPoolConfig with -1 maxTotal doesnt work as unlimited pool BoundedPoolConfig with -1 as maxTotal does not work as unlimited pool Jan 4, 2022
@mp911de mp911de added this to the 6.0.9 milestone Jan 4, 2022
@mp911de
Copy link
Collaborator

mp911de commented Jan 4, 2022

Thanks for filing a bug report. It is indeed a bug and we're going to fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants