go-redis
go-redis copied to clipboard
How to migrate slot (CLUSTER SETSLOT)
this is doc: https://redis.io/commands/cluster-setslot#redis-cluster-live-resharding-explained
I want to migrate some slots from one to another.
before:
cluster nodes
43a1af446b289000fb2d187215eeceab356efa86 10.100.203.165:7002 master - 0 1536142793128 2 connected 10922-16383
659c45f1be91a41bbcacc895e500e39aff4b767e 10.100.203.165:7000 myself,master - 0 0 1 connected 0-5460
ab58196edbfb0861fd73846353e464c30ae2cabb 10.100.203.165:7001 master - 0 1536142794131 0 connected 5461-10921
I want :
cluster nodes
43a1af446b289000fb2d187215eeceab356efa86 10.100.203.165:7002 master - 0 1536142793128 2 connected 10922-16383
659c45f1be91a41bbcacc895e500e39aff4b767e 10.100.203.165:7000 myself,master - 0 0 1 connected 0-8000
ab58196edbfb0861fd73846353e464c30ae2cabb 10.100.203.165:7001 master - 0 1536142794131 0 connected 8001-10921
And I do not find any function can use, like CLUSTER SETSLOT
So, how to do it?
thanks!
We should add that function to the commands list but for now you can use:
client.Do("cluster", "setslot", slot, "importing", node).Err()
@vmihailenco OK Thanks!
This issue is marked stale. It will be closed in 30 days if it is not updated.