Repository navigation
Lettuce cluster refresh properties are ignored when the cluster is not configured using spring.data.redis.cluster properties - #52190
Merged
snicoll merged 1 commit intoOct 21, 2026
Conversation
Previously, ClusterClientOptions were only created, and the spring.data.redis.lettuce.cluster.refresh.* properties only applied, when spring.data.redis.cluster.* properties were set. When the cluster was configured using a DataRedisConnectionDetails bean or a RedisClusterConfiguration bean, plain ClientOptions were created and the refresh properties were ignored. Use the mode that has already been determined for the connection rather than checking the cluster properties. See spring-projectsgh-52190 Signed-off-by: Jialin Chen <cccll2019@gmail.com>
snicoll
force-pushed
the
fix/lettuce-cluster-client-options
branch
from
October 21, 2026 08:00
c233c5a to
a0a090e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
LettuceConnectionConfigurationdecides whether to createClusterClientOptionsby checking whether anyspring.data.redis.cluster.*property has been set. When the cluster is configured in another way, using aDataRedisConnectionDetailsbean that returns aClusteror aRedisClusterConfigurationbean, plainClientOptionsare created instead. As a result, thespring.data.redis.lettuce.cluster.refresh.*properties are silently ignored and aLettuceClientOptionsBuilderCustomizeris not given aClusterClientOptions.Builder.Use the mode that
DataRedisConnectionConfigurationhas already determined instead. It is also what selects the cluster connection factory.Validation:
expected: io.lettuce.core.cluster.ClusterClientOptions but was: io.lettuce.core.ClientOptions) and pass afterwards.:module:spring-boot-data-redis:checkpassed. The 125 tests intestpassed; 10 of the 12dockerTesttests were skipped as Docker was not available.DataRedisConnectionDetailsbean andspring.data.redis.lettuce.cluster.refresh.period=1s. Before the fix, periodic refresh was disabled on theRedisClusterClientand the number ofCLUSTER NODEScalls received by a node did not change over six seconds. After the fix, it was enabled and the count rose from 7 to 13.Tested on
4.0.x(2ad144241ad) with JDK 25.