1. setup a redis cluster with 3 master serving slots [0-5460], [5461-10922], [10923-16383], called it M1, M2, M3.
  2. use redis-cli to execute "ssubscribe" on channel CH0 with slot 0 on slave serving slot [0-5460], called it S1, so that we are subscribing CH0 on S1.
  3. execute CLUSTER REPLICATE on slave S1 to replicate M2, so that it becomes S2, replicating slot [5461-10922], and no longer replicate [0-5460]
  4. redis-cli does not receive sunsubscribe or any signals on CH0 and continues to block.

Is this a bug?

Comment From: adamsau

@filipecosta90

Comment From: hpatro

@adamsau Thanks for reporting this issue.

I was able to reproduce the issue. I see this case is not handled when a replica is being moved from one primary to another, the sharded pubsub state isn't cleaned up. Will get a fix out soon.