mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 16:18:28 -05:00
MIGRATE: Fix new argument rewriting refcount handling.
This commit is contained in:
parent
d85fc1e9cf
commit
ac0a731057
@ -4763,8 +4763,6 @@ try_again:
|
||||
}
|
||||
} else {
|
||||
if (!copy) {
|
||||
robj *aux;
|
||||
|
||||
/* No COPY option: remove the local key, signal the change. */
|
||||
dbDelete(c->db,kv[j]);
|
||||
signalModifiedKey(c->db,kv[j]);
|
||||
@ -4772,6 +4770,7 @@ try_again:
|
||||
|
||||
/* Populate the argument vector to replace the old one. */
|
||||
newargv[del_idx++] = kv[j];
|
||||
incrRefCount(kv[j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -4780,7 +4779,7 @@ try_again:
|
||||
/* Translate MIGRATE as DEL for replication/AOF. */
|
||||
if (del_idx > 1) {
|
||||
newargv[0] = createStringObject("DEL",3);
|
||||
replaceClientCommandVector(c,newargv,del_idx);
|
||||
replaceClientCommandVector(c,del_idx,newargv);
|
||||
} else {
|
||||
/* No key transfer acknowledged, no need to rewrite as DEL. */
|
||||
zfree(newargv);
|
||||
|
Loading…
Reference in New Issue
Block a user