Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Deleted node when added againg as master doesn't get new shardid (CLUSTER SHARDS becomes wrong) #13362

Open
a-meledin opened this issue Jun 24, 2024 · 0 comments
Labels

Comments

@a-meledin
Copy link

a-meledin commented Jun 24, 2024

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 <node_id> - 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.

@sundb sundb added the cluster label Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants