Skip to content

Warm the internalPool upon initialization of the JedisPool #1828

@tmack8001

Description

@tmack8001

Expected behavior

I'd expect the behavior of creating a GenericConnectionPool to also warm the connection pool based on the configuration of the pool itself (minIdle, etc). This would take place by calling the following method upon initialization of the connection pool:

this.internalPool.preparePool();

This method internally will attempt to ensure that the correct minIdle instances are available for threads to consume and use at the point the pool is first configured. One approach could be to make this optional via a specific pool parameter/argument to say "warmPool: true | false"

Actual behavior

The GenericObjectPool is created with the correct pool configurations, but the pool is never warmed. The logic within GenericObjectPool itself doesn't warm the pool itself upon creation this is up to the user of the object pool instance to maintain.

Steps to reproduce:

Redis / Jedis Configuration

Jedis version: master or 2.9.0 (latest released version)

Redis version: N/A

Java version: N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions