From ad297a1a6782905394cb56b00ed6dbd08707fb04 Mon Sep 17 00:00:00 2001 From: antirez Date: Tue, 29 Jan 2013 13:50:01 +0100 Subject: [PATCH] Z*STORE event fixed: generate del only if resulting sorted set is empty. --- src/t_zset.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/t_zset.c b/src/t_zset.c index b458f88a1..8ef9c5376 100644 --- a/src/t_zset.c +++ b/src/t_zset.c @@ -1680,7 +1680,6 @@ void zunionInterGenericCommand(redisClient *c, robj *dstkey, int op) { if (dbDelete(c->db,dstkey)) { signalModifiedKey(c->db,dstkey); - notifyKeyspaceEvent(REDIS_NOTIFY_GENERIC,"del",dstkey,c->db->id); touched = 1; server.dirty++; } @@ -1700,6 +1699,8 @@ void zunionInterGenericCommand(redisClient *c, robj *dstkey, int op) { } else { decrRefCount(dstobj); addReply(c,shared.czero); + if (touched) + notifyKeyspaceEvent(REDIS_NOTIFY_GENERIC,"del",dstkey,c->db->id); } zfree(src); }