ioredis icon indicating copy to clipboard operation
ioredis copied to clipboard

fix(ssubscribe): [cherrypick from v4] Force slots refresh on MOVED error when using ssubscribe

Open htemelski-oss opened this issue 6 months ago • 0 comments

When issuing a ssubscribe command, the Cluster client creates a "regular" Redis client to establish a connection to the correct shard. This doesn't work if there's a failover since the client doesn't know how to correctly handle a MOVED response. This PR handles such events by propagating the ssubscribe MOVED error from the DataHandler, through the ClusterSubscriber and the ClusterSubscriberGroup to the RedisCluster client and forces slots refresh.

Direct port from #1987

htemelski-oss avatar Jun 16 '25 11:06 htemelski-oss