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

RedisTemplate executing exception is swallowed when release connection errors [DATAREDIS-1104] #1674

spring-projects-issues opened this issue Feb 21, 2020 · 1 comment
in: core in: jedis type: bug


Copy link

spring-projects-issues commented Feb 21, 2020

Suo Lu opened DATAREDIS-1104 and commented


RedisTemplate.execute has try-finally block without catch. If anything wrong in finally RedisConnectionUtils.releaseConnection, the original error will be swallowed.


The client side has " Unknown reply" ([^err.log]) time to time, however RedisTemplate is thread-safe, have no idea what's wrong. Until I debug RedisTemplate.execute added catch block print, to get the real error “SocketTimeoutException: Read timed out”([^err_swallowed.log])

I reviewed the master branch code, same as reproduced version in related pieces

Affects: 2.1.15 (Lovelace SR15)


Backported to: 2.2.5 (Moore SR5), 2.1.16 (Lovelace SR16)

Copy link

spring-projects-issues commented Feb 25, 2020

Mark Paluch commented

Good point. Releasing a connection should not affect the code flow in terms of hiding the exception. It makes sense to process silently on close failures and log failures to the debug log for further investigation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
in: core in: jedis type: bug
None yet

No branches or pull requests

2 participants