Skip to content

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

Closed
kdrakon wants to merge 1 commit intoredis:masterfrom
kdrakon:lower-log-level-on-validateObject
Closed

log a warning when validateObject determines the connection is no longer connected and/or the ping fails#3747
kdrakon wants to merge 1 commit intoredis:masterfrom
kdrakon:lower-log-level-on-validateObject

Conversation

@kdrakon
Copy link
Copy Markdown

@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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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