mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-23 00:28:26 -05:00
redis-trib: set the migrating slot in the correct way when resharding.
This commit is contained in:
parent
9a04e12cc0
commit
b8d8b9ec41
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user