When topology refresh is on,

enable the follow config:

spring.redis.lettuce.cluster.refresh.adaptive=true
spring.redis.lettuce.cluster.refresh.period=5s

invoke org.springframework.data.redis.connection.RedisClusterCommands#clusterGetNodes

An ConcurrentModificationException may be triggered

reason: io.lettuce.core.cluster.models.partitions.Partitions#partitions Non thread safe,

java.util.ConcurrentModificationException: null
    at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:909)
    at java.util.ArrayList$Itr.next(ArrayList.java:859)
    at org.springframework.data.redis.connection.lettuce.LettuceConverters$1.convert(LettuceConverters.java:226)
    at org.springframework.data.redis.connection.lettuce.LettuceConverters$1.convert(LettuceConverters.java:217)
    at org.springframework.data.redis.connection.lettuce.LettuceConverters.partitionsToClusterNodes(LettuceConverters.java:716)
    at org.springframework.data.redis.connection.lettuce.LettuceClusterConnection.clusterGetNodes(LettuceClusterConnection.java:575)
    at org.springframework.data.redis.connection.lettuce.LettuceClusterConnection.clusterGetNodes(LettuceClusterConnection.java:61)

Comment From: philwebb

Data Redis is managed in a different project. I've duplicated your issue at https://jira.spring.io/browse/DATAREDIS-1221

Comment From: mp911de

Please upgrade to Spring Data Redis 2.2 M2, 2.1.6, or newer as the issue was addressed with https://jira.spring.io/browse/DATAREDIS-888.