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
b8d8b9ec
Commit
b8d8b9ec
authored
Feb 20, 2013
by
antirez
Browse files
redis-trib: set the migrating slot in the correct way when resharding.
parent
9a04e12c
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/redis-trib.rb
View file @
b8d8b9ec
...
...
@@ -354,7 +354,7 @@ class RedisTrib
# to the target node that does not yet know it is importing this slot.
print
"Moving slot
#{
slot
}
from
#{
source
.
info_string
}
: "
;
STDOUT
.
flush
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
while
true
keys
=
source
.
r
.
cluster
(
"getkeysinslot"
,
slot
,
10
)
...
...
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