-
Notifications
You must be signed in to change notification settings - Fork 1.2k
LettuceConnectionFactory.destroy(…)
releases cluster connections after shutting down the connection pool
#2330
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
The problem that you see is an ordering issue without real impact, it's mostly logging an exception. Shutting down We need to fix the issue. |
LettuceConnectionFactory.destroy(…)
releases cluster connections after shutting down the connection pool
We now close the cluster command executor before cleaning up the connection pools so that we first release all held connections before pruning the connection pools. Previously, the pools were pruned first leading to an attempt to return the connection held by the cluster command executor causing a PoolException. Closes #2330
We now close the cluster command executor before cleaning up the connection pools so that we first release all held connections before pruning the connection pools. Previously, the pools were pruned first leading to an attempt to return the connection held by the cluster command executor causing a PoolException. Closes #2330
@mp911de thx for your reply, as you said, it's an ordering issue without real impact, it's mostly logging an exception. |
spring-data-redis/src/main/java/org/springframework/data/redis/connection/lettuce/LettuceClusterConnection.java
Lines 545 to 570 in 1475069
if i execute
RedisConnectionCommands::ping
command via a redistemplate, then should thisconnection
variable to be reset to null in the callback methodreturnResourceForSpecificNode
?if not, then when the
destroy
callback was called druing spring exit , theconnectionProvider
was already closed, callingconnectionProvider.release(connection);
would result in exception :Returned connection io.lettuce.core.cluster.StatefulRedisClusterConnectionImpl@2d3456b was either previously returned or does not belong to this connection provider
, did i understand right?spring-data-redis/src/main/java/org/springframework/data/redis/connection/lettuce/LettucePoolingConnectionProvider.java
Lines 145 to 165 in 1475069
The text was updated successfully, but these errors were encountered: