Merge pull request #6593 from daidaotong/movecommandfix

fix move command: WATCH/MULTI/EXEC mechanism breaks
This commit is contained in:
Salvatore Sanfilippo 2019-11-25 10:02:43 +01:00 committed by GitHub
commit 6203ed0474
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1034,6 +1034,13 @@ void moveCommand(client *c) {
/* OK! key moved, free the entry in the source DB */
dbDelete(src,c->argv[1]);
signalModifiedKey(src,c->argv[1]);
signalModifiedKey(dst,c->argv[1]);
notifyKeyspaceEvent(NOTIFY_GENERIC,
"move_from",c->argv[1],src->id);
notifyKeyspaceEvent(NOTIFY_GENERIC,
"move_to",c->argv[1],dst->id);
server.dirty++;
addReply(c,shared.cone);
}