Skip to content

log a warning when validateObject determines the connection is no longer connected and/or the ping fails #3747

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

Closed

Conversation

kdrakon
Copy link

@kdrakon kdrakon commented Feb 28, 2024

changes

When ConnectionFactory.validateObject is called, the method logs an ERROR level log if the connection to Redis is disconnected and/or the ping fails. This method is called by org.apache.commons.pool2.impl.GenericObjectPool.evict when validating if a connection should be evicted. Because it is expected that the connection may no longer be valid, I suggest we log a WARN instead.

As a user of the library, we are getting paged due to our incident monitoring looking for any ERROR log-levels. I alternatively could modify our logging config to filter out this particular log, but I wouldn't want to filter out any future ERROR logs that could be added in the class or package.

@sazzad16
Copy link
Contributor

The reasons for logging in validateObject is quite broad.

But I understand and so I have created #3749. As the solution is same, I am not discussing here further and hope you would be satisfied anyway if the solution gets merged.

Thanks for using Jedis and being part of the conversation 🙂

@kdrakon
Copy link
Author

kdrakon commented Feb 29, 2024

The reasons for logging in validateObject is quite broad.

But I understand and so I have created #3749. As the solution is same, I am not discussing here further and hope you would be satisfied anyway if the solution gets merged.

Thanks for using Jedis and being part of the conversation 🙂

Thanks @sazzad16, I would be satisfied with #3749 🙏

@kdrakon
Copy link
Author

kdrakon commented Feb 29, 2024

Closing. Will be fixed in #3749 #3750

@kdrakon kdrakon closed this Feb 29, 2024
@kdrakon kdrakon deleted the lower-log-level-on-validateObject branch February 29, 2024 13:06
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.

3 participants