question regarding redis cluster resharding documentation

37 views
Skip to first unread message

Dann S Washko

unread,
Jul 21, 2016, 3:52:50 PM7/21/16
to Redis DB
According to what I am reading here: http://redis.io/commands/cluster-setslot

To migrate a keyslot from one node to another requires the following steps:

on destination node: redis-cli -c -h hostname CLUSTER SETSLOT <slot> importing <source-node-id>
on source node: redis-cli -c -h hostname CLUSTER SETSLOT <slot> migrating <destination-node-id>
on source node: redis-cli -c -h hostname CLUSTER GETKEYSINSLOT <slot> <count>
on source node: redis-cli -c -h hostname MIGRATE <desitnation-ip> <destination-port> <key> <db> <timeout>  This is done for each key
on either source or destination node: redis-cli -c -h hostname CLUSTER SETSLOT <slot> NODE <destination-node-id>


I have issue with the last step specifying that it should be run on either the source or destination node. If I run the command on the destination node, the source node slot is still open. If I run it only on the source node the destination slot remains open. I have to run the command on both the source and the destination nodes for the slot to be properly migrated and closed.

Is my understanding of the steps incorrect? Could this be a problem with the version of Redis I am using - 3.0.1? Or is the documentation incorrect and the last step needs to be run on both the source and the destination nodes?

Tuco

unread,
Jul 21, 2016, 11:56:56 PM7/21/16
to Redis DB
You have to run on both the source and destination nodes..
The last time i tried, i had to run on all the nodes, not just source and destination, so that it was appropriately reflected in their generated conf files, and the output of redis-cli cluster nodes is appropriate.
So, i would say, to be 100% sure, run the last command on all the nodes.

Dann S Washko

unread,
Jul 22, 2016, 10:50:12 AM7/22/16
to Redis DB
Thanks for the response. I did not notice a problem with all the other nodes but I will keep this in mind. 

Reply all
Reply to author
Forward
0 new messages