Versioned cache writes (ts latest, attributes, versioned entity caches) took
a connection to the slot owner from the Jedis slot map and ran EVALSHA on it
directly, bypassing the Jedis cluster command executor. Only that executor
renews the slot map on MOVED or connection errors, so after a failover or a
node address change every later write to the moved slots failed until the
JVM restarted. A failed ts latest cache write fails saveLatest, so the
subscription update was never published and WebSocket clients got nothing.
- Send versioned puts through the cluster client: it follows MOVED/ASK and
renews the slot map itself.
- WATCH/MULTI and evictByPrefix still need a connection to one node: on a
connection or redirect error, renew the slot map and retry once.
- Build the JedisCluster in TbJedisClusterConnectionFactory, so the slot map
can be renewed on demand and is refreshed in the background
(redis.cluster.topology-refresh-period-sec, default 30 s, 0 disables).
- A transaction that queues EVALSHA fails with NOSCRIPT on a freshly promoted
replica. Load the script on that node and report the transaction as not
applied, instead of failing the read that filled the cache.
- Log saveLatest/removeLatest failures at WARN, at most once per 30 s. They
were logged only with TRACE enabled.
RedisClusterTopologyChangeTest covers a failover (old master alive, MOVED)
and a stopped master (old address gone) on a Valkey cluster; both fail on
the previous code.