From f0868e080dacbf865668f6e435f7d6d8e1341357 Mon Sep 17 00:00:00 2001 From: Raymond Myers Date: Tue, 1 Apr 2014 14:54:31 -0700 Subject: [PATCH 1/2] Change HLL* to PF* in error messages --- src/hyperloglog.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hyperloglog.c b/src/hyperloglog.c index b4a607d5..e7a2b4d7 100644 --- a/src/hyperloglog.c +++ b/src/hyperloglog.c @@ -458,7 +458,7 @@ void pfaddCommand(redisClient *c) { * exactly. */ if (stringObjectLen(o) != REDIS_HLL_SIZE) { addReplyErrorFormat(c, - "HLLADD target key must contain a %d bytes string.", + "PFADD target key must contain a %d bytes string.", REDIS_HLL_SIZE); return; } @@ -502,7 +502,7 @@ void pfcountCommand(redisClient *c) { * exactly. */ if (stringObjectLen(o) != REDIS_HLL_SIZE) { addReplyErrorFormat(c, - "HLLCOUNT target key must contain a %d bytes string.", + "PFCOUNT target key must contain a %d bytes string.", REDIS_HLL_SIZE); return; } @@ -562,7 +562,7 @@ void pfmergeCommand(redisClient *c) { if (stringObjectLen(o) != REDIS_HLL_SIZE) { addReplyErrorFormat(c, - "HLLADD target key must contain a %d bytes string.", + "PFADD target key must contain a %d bytes string.", REDIS_HLL_SIZE); return; } From bf066c875f625d5740f2a85d56d36140023c9dc8 Mon Sep 17 00:00:00 2001 From: Raymond Myers Date: Tue, 1 Apr 2014 14:59:13 -0700 Subject: [PATCH 2/2] Fixed pfadd/pfcount commands emitting hll* events instead of pf* events --- src/hyperloglog.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hyperloglog.c b/src/hyperloglog.c index e7a2b4d7..546dd0fb 100644 --- a/src/hyperloglog.c +++ b/src/hyperloglog.c @@ -475,7 +475,7 @@ void pfaddCommand(redisClient *c) { } if (updated) { signalModifiedKey(c->db,c->argv[1]); - notifyKeyspaceEvent(REDIS_NOTIFY_STRING,"hlladd",c->argv[1],c->db->id); + notifyKeyspaceEvent(REDIS_NOTIFY_STRING,"pfadd",c->argv[1],c->db->id); server.dirty++; /* Invalidate the cached cardinality. */ registers[REDIS_HLL_SIZE-1] |= (1<<7); @@ -602,7 +602,7 @@ void pfmergeCommand(redisClient *c) { signalModifiedKey(c->db,c->argv[1]); /* We generate an HLLADD event for HLLMERGE for semantical simplicity * since in theory this is a mass-add of elements. */ - notifyKeyspaceEvent(REDIS_NOTIFY_STRING,"hlladd",c->argv[1],c->db->id); + notifyKeyspaceEvent(REDIS_NOTIFY_STRING,"pfadd",c->argv[1],c->db->id); server.dirty++; addReply(c,shared.ok); }