* fix: handle network error on SETINFO
This fix addresses potential out of order responses as described in `CVE-2025-29923`
* fix: deprecate DisableIndentity and introduce DisableIdentity
Both options will work before V10. In v10 DisableIndentity will be dropped. The preferred flag to use is `DisableIdentity`.
* fix: add unstableresp3 to cluster client
* propagate unstableresp3
* proper test that will ignore error, but fail if client panics
* add separate test for clusterclient constructor
Resolve a race condition in the clusterNodes.Addrs() method.
Previously, the method returned a reference to a string slice, creating
the potential for concurrent reads by the caller while the slice was
being modified by the garbage collection process.
Co-authored-by: Nedyalko Dyakov <nedyalko.dyakov@gmail.com>
* Only check latencies once every 10 seconds with `routeByLatency`
`routeByLatency` currently checks latencies any time a server returns
a MOVED or READONLY reply. When a shard is down, the ClusterClient
chooses to issue the request to a random server, which returns a MOVED
reply. This causes a state refresh and a latency update on all servers.
This can lead to significant ping load to clusters with a large number
of clients.
This introduces logic to ping only once every 10 seconds, only
performing a latency update on a node during the `GC` function if the
latency was set later than 10 seconds ago.
Fixes https://github.com/redis/go-redis/issues/2782
* use UnixNano instead of Unix for better precision
---------
Co-authored-by: ofekshenawa <104765379+ofekshenawa@users.noreply.github.com>