redis-trib: set the migrating slot in the correct way when resharding.

This commit is contained in:
antirez 2013-02-20 15:29:44 +01:00
parent 9a04e12cc0
commit b8d8b9ec41

View File

@ -354,7 +354,7 @@ class RedisTrib
# to the target node that does not yet know it is importing this slot. # to the target node that does not yet know it is importing this slot.
print "Moving slot #{slot} from #{source.info_string}: "; STDOUT.flush print "Moving slot #{slot} from #{source.info_string}: "; STDOUT.flush
target.r.cluster("setslot",slot,"importing",source.info[:name]) target.r.cluster("setslot",slot,"importing",source.info[:name])
source.r.cluster("setslot",slot,"migrating",source.info[:name]) source.r.cluster("setslot",slot,"migrating",target.info[:name])
# Migrate all the keys from source to target using the MIGRATE command # Migrate all the keys from source to target using the MIGRATE command
while true while true
keys = source.r.cluster("getkeysinslot",slot,10) keys = source.r.cluster("getkeysinslot",slot,10)