Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
be7bdd37
Commit
be7bdd37
authored
Mar 22, 2013
by
antirez
Browse files
redis-trib: fix open slot correction.
Slot zero was hardcoded (!)
parent
813d7cbd
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/redis-trib.rb
View file @
be7bdd37
...
@@ -407,8 +407,7 @@ class RedisTrib
...
@@ -407,8 +407,7 @@ class RedisTrib
# Case 1: The slot is in migrating state in one slot, and in
# Case 1: The slot is in migrating state in one slot, and in
# 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
puts
"Moving slot zero to
#{
importing
[
1
]
}
"
move_slot
(
migrating
[
0
],
importing
[
0
],
slot
,
:verbose
=>
true
)
move_slot
(
migrating
[
0
],
importing
[
0
],
0
,
:verbose
=>
true
)
else
else
puts
"Sorry, Redis-trib can't fix this slot yet (work in progress)"
puts
"Sorry, Redis-trib can't fix this slot yet (work in progress)"
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment