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
dc600a25
Commit
dc600a25
authored
Jul 24, 2018
by
antirez
Browse files
Example the magic +1 in migrateCommand().
Related to #5154.
parent
d6827ab6
Changes
1
Show whitespace changes
Inline
Side-by-side
src/cluster.c
View file @
dc600a25
...
...
@@ -5226,6 +5226,10 @@ try_again:
int
socket_error
=
0
;
int
del_idx
=
1
;
/* Index of the key argument for the replicated DEL op. */
/* Allocate the new argument vector that will replace the current command,
* to propagate the MIGRATE as a DEL command (if no COPY option was given).
* We allocate num_keys+1 because the additional argument is for "DEL"
* command name itself. */
if
(
!
copy
)
newargv
=
zmalloc
(
sizeof
(
robj
*
)
*
(
num_keys
+
1
));
for
(
j
=
0
;
j
<
num_keys
-
expired
;
j
++
)
{
...
...
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