mirror of
https://github.com/fluencelabs/redis
synced 2025-03-30 22:31:03 +00:00
Rewrite MIGRATE as DEL for AOF/replication. Also increment the dirty counter to both force replication and persistence.
This commit is contained in:
parent
2a95c944ff
commit
37d650032a
@ -1509,8 +1509,16 @@ void migrateCommand(redisClient *c) {
|
|||||||
addReplyErrorFormat(c,"Target instance replied with error: %s",
|
addReplyErrorFormat(c,"Target instance replied with error: %s",
|
||||||
(buf1[0] == '-') ? buf1+1 : buf2+1);
|
(buf1[0] == '-') ? buf1+1 : buf2+1);
|
||||||
} else {
|
} else {
|
||||||
|
robj *aux;
|
||||||
|
|
||||||
dbDelete(c->db,c->argv[3]);
|
dbDelete(c->db,c->argv[3]);
|
||||||
addReply(c,shared.ok);
|
addReply(c,shared.ok);
|
||||||
|
server.dirty++;
|
||||||
|
|
||||||
|
/* Translate MIGRATE as DEL for replication/AOF. */
|
||||||
|
aux = createStringObject("DEL",2);
|
||||||
|
rewriteClientCommandVector(c,2,aux,c->argv[3]);
|
||||||
|
decrRefCount(aux);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user