mirror of
https://github.com/fluencelabs/redis
synced 2025-03-19 09:00:51 +00:00
Cluster: redis-trib fix: cover new case of open slot.
The case is the trivial one a single node claiming the slot as migrating, without nodes claiming it as importing.
This commit is contained in:
parent
59e03a8f35
commit
1ae50a9b1d
@ -470,6 +470,9 @@ class RedisTrib
|
|||||||
# importing state in 1 slot. That's trivial to address.
|
# importing state in 1 slot. That's trivial to address.
|
||||||
if migrating.length == 1 && importing.length == 1
|
if migrating.length == 1 && importing.length == 1
|
||||||
move_slot(migrating[0],importing[0],slot,:verbose=>true)
|
move_slot(migrating[0],importing[0],slot,:verbose=>true)
|
||||||
|
elsif migrating.length == 1 && importing.length == 0
|
||||||
|
xputs ">>> Setting #{slot} as STABLE"
|
||||||
|
migrating[0].r.cluster("setslot",slot,"stable")
|
||||||
else
|
else
|
||||||
xputs "[ERR] Sorry, Redis-trib can't fix this slot yet (work in progress)"
|
xputs "[ERR] Sorry, Redis-trib can't fix this slot yet (work in progress)"
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user