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
ac0a7310
Commit
ac0a7310
authored
Dec 11, 2015
by
antirez
Browse files
MIGRATE: Fix new argument rewriting refcount handling.
parent
d85fc1e9
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/cluster.c
View file @
ac0a7310
...
@@ -4763,8 +4763,6 @@ try_again:
...
@@ -4763,8 +4763,6 @@ try_again:
}
}
}
else
{
}
else
{
if
(
!
copy
)
{
if
(
!
copy
)
{
robj
*
aux
;
/* No COPY option: remove the local key, signal the change. */
/* No COPY option: remove the local key, signal the change. */
dbDelete
(
c
->
db
,
kv
[
j
]);
dbDelete
(
c
->
db
,
kv
[
j
]);
signalModifiedKey
(
c
->
db
,
kv
[
j
]);
signalModifiedKey
(
c
->
db
,
kv
[
j
]);
...
@@ -4772,6 +4770,7 @@ try_again:
...
@@ -4772,6 +4770,7 @@ try_again:
/* Populate the argument vector to replace the old one. */
/* Populate the argument vector to replace the old one. */
newargv
[
del_idx
++
]
=
kv
[
j
];
newargv
[
del_idx
++
]
=
kv
[
j
];
incrRefCount
(
kv
[
j
]);
}
}
}
}
}
}
...
@@ -4780,7 +4779,7 @@ try_again:
...
@@ -4780,7 +4779,7 @@ try_again:
/* Translate MIGRATE as DEL for replication/AOF. */
/* Translate MIGRATE as DEL for replication/AOF. */
if
(
del_idx
>
1
)
{
if
(
del_idx
>
1
)
{
newargv
[
0
]
=
createStringObject
(
"DEL"
,
3
);
newargv
[
0
]
=
createStringObject
(
"DEL"
,
3
);
replaceClientCommandVector
(
c
,
newargv
,
del_idx
);
replaceClientCommandVector
(
c
,
del_idx
,
newargv
);
}
else
{
}
else
{
/* No key transfer acknowledged, no need to rewrite as DEL. */
/* No key transfer acknowledged, no need to rewrite as DEL. */
zfree
(
newargv
);
zfree
(
newargv
);
...
...
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