Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use shard-id of the master if the replica does not support shard-id
If there are nodes in the cluster that do not support shard-id, they will gossip shard-id. From the perspective of nodes that support shard-id, their shard-id is meaningless (since shard-id is randomly generated when we create a node.) Nodes that support shard-id will save the shard-id information in nodes.conf. If the node is restarted according to nodes.conf, the server will report a `corrupted cluster config file` error. Because auxShardIdSetter will reject configurations with inconsistent master-replica shard-ids. In this PR, when process the gossip, if sender is a replica and does not support shard-id, set the shard_id to the shard_id of its master. This fix redis#12761.
- Loading branch information