Redis 7.2.4: Suppose there is a cluster with 2 shards, one master and several replicas in each.

Steps to reproduce: 1. redis-cli --cluster del-node 127.0.0.1:7001 - move replica out from one shard. 2. redis-cli --cluster add-node 127.0.0.1:7001 127.0.0.1:7002 - add it as a new master CLUSTER MYSHARDID: returns old id CLUSTER SHARDS gives 2 shards 3. redis-cli --cluster reshard - moving empty slots under new master CLUSTER MYSHARDID: returns old id CLUSTER SLOTS: correct

CLUSTER SHARDS is incorrect: 1. Master of a shard from which new master was born sees new master as part of its shard. 2. New master thinks that his old master is part of his shard. So CLUSTER SHARDS still have 2 shards.

CLUSTER INFO and CLUSTER NODES/SLOTS are correct. Have cluster_size = 3.

Comment From: sundb

seems it's related to https://github.com/redis/redis/pull/13422?