Commit 32e940c0 authored by antirez's avatar antirez
Browse files

MIGRATE: Fix new argument rewriting refcount handling.

parent c460458d
...@@ -4760,8 +4760,6 @@ try_again: ...@@ -4760,8 +4760,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]);
...@@ -4769,6 +4767,7 @@ try_again: ...@@ -4769,6 +4767,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]);
} }
} }
} }
...@@ -4777,7 +4776,7 @@ try_again: ...@@ -4777,7 +4776,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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment