Commit 37d65003 authored by antirez's avatar antirez
Browse files

Rewrite MIGRATE as DEL for AOF/replication. Also increment the dirty counter...

Rewrite MIGRATE as DEL for AOF/replication. Also increment the dirty counter to both force replication and persistence.
parent 2a95c944
...@@ -1509,8 +1509,16 @@ void migrateCommand(redisClient *c) { ...@@ -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);
} }
} }
......
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