Adds keyspace notifications for lrem

This commit is contained in:
Itamar Haber committed 2016-02-02 09:58:19 -08:00
1 parent e9cd997869
commit bfd072e7d3
1 file changed
+6 -1
+6 -1
View File
@@ -509,12 +509,17 @@ void lremCommand(client *c) {
}
listTypeReleaseIterator(li);
if (removed) {
signalModifiedKey(c->db,c->argv[1]);
notifyKeyspaceEvent(NOTIFY_GENERIC,"lrem",c->argv[1],c->db->id);
}
if (listTypeLength(subject) == 0) {
dbDelete(c->db,c->argv[1]);
notifyKeyspaceEvent(NOTIFY_GENERIC,"del",c->argv[1],c->db->id);
}
addReplyLongLong(c,removed);
if (removed) signalModifiedKey(c->db,c->argv[1]);
}
/* This is the semantic of this command: