BITOP: propagate only when it really SET or DEL targetkey (#5783)
For example: BITOP not targetkey sourcekey If targetkey and sourcekey doesn't exist, BITOP has no effect, we do not propagate it, thus can save aof and replica flow. (cherry picked from commit 1978f996d8b13db112d5d2fdf4a4ce2baf636729)
This commit is contained in:
parent
14a59d4ce7
commit
3155adb299
@ -759,11 +759,12 @@ void bitopCommand(client *c) {
|
||||
setKey(c,c->db,targetkey,o);
|
||||
notifyKeyspaceEvent(NOTIFY_STRING,"set",targetkey,c->db->id);
|
||||
decrRefCount(o);
|
||||
server.dirty++;
|
||||
} else if (dbDelete(c->db,targetkey)) {
|
||||
signalModifiedKey(c,c->db,targetkey);
|
||||
notifyKeyspaceEvent(NOTIFY_GENERIC,"del",targetkey,c->db->id);
|
||||
}
|
||||
server.dirty++;
|
||||
}
|
||||
addReplyLongLong(c,maxlen); /* Return the output string length in bytes. */
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user