Skip to content

[Suggested change] Log a warning when ConnectionFactory.validateObject determines the connection is no longer connected and/or the ping fails #3748

@kdrakon

Description

@kdrakon

Expected behavior

When a connection is evicted in JedisPool, this is done quietly in the background.

Actual behavior

While it seems the eviction is working correctly—via the Apache commons-pool library—the Jedis library logs an ERROR level log when determining the connection is no longer valid.

Steps to reproduce:

To reproduce, you need to have your pool connected and simulate an 'invalid' connection by having the server drop the connection to the Jedis client pool.

Suggested change:

Because it is expected that the connection may no longer be valid, I suggest we log a WARN instead of an ERROR. I've made a small PR that makes that change here: #3747

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