mirror of
https://github.com/fluencelabs/redis
synced 2025-03-19 17:10:50 +00:00
redis-trib.rb: MIGRATE hardcoded timeout set to 15 sec.
Will be configurable / adaptive at some point but let's start with a saner value compared to 1 sec which is not a good idea for big data structures stored into a single key.
This commit is contained in:
parent
5c78f87666
commit
939c586ef7
@ -724,7 +724,7 @@ class RedisTrib
|
|||||||
keys = source.r.cluster("getkeysinslot",slot,10)
|
keys = source.r.cluster("getkeysinslot",slot,10)
|
||||||
break if keys.length == 0
|
break if keys.length == 0
|
||||||
keys.each{|key|
|
keys.each{|key|
|
||||||
source.r.client.call(["migrate",target.info[:host],target.info[:port],key,0,1000])
|
source.r.client.call(["migrate",target.info[:host],target.info[:port],key,0,15000])
|
||||||
print "." if o[:verbose]
|
print "." if o[:verbose]
|
||||||
STDOUT.flush
|
STDOUT.flush
|
||||||
}
|
}
|
||||||
@ -1024,7 +1024,7 @@ class RedisTrib
|
|||||||
slot = key_to_slot(k)
|
slot = key_to_slot(k)
|
||||||
target = slots[slot]
|
target = slots[slot]
|
||||||
puts "Migrating #{k} to #{target}"
|
puts "Migrating #{k} to #{target}"
|
||||||
source.client.call(["migrate",target.info[:host],target.info[:port],k,0,1000])
|
source.client.call(["migrate",target.info[:host],target.info[:port],k,0,15000])
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user