mirror of
https://github.com/fluencelabs/redis
synced 2025-05-07 08:22:13 +00:00
PFDEBUG TODENSE added.
Converts HyperLogLogs from sparse to dense. Used for testing.
This commit is contained in:
parent
402110f9fd
commit
0bbdaca6a0
@ -1427,6 +1427,21 @@ void pfdebugCommand(redisClient *c) {
|
||||
if (c->argc != 3) goto arityerr;
|
||||
|
||||
addReplyStatus(c,encodingstr[hdr->encoding]);
|
||||
}
|
||||
/* PFDEBUG TODENSE <key> */
|
||||
else if (!strcasecmp(cmd,"todense")) {
|
||||
int conv = 0;
|
||||
if (c->argc != 3) goto arityerr;
|
||||
|
||||
if (hdr->encoding == HLL_SPARSE) {
|
||||
if (hllSparseToDense(o) == REDIS_ERR) {
|
||||
addReplyError(c,invalid_hll_err);
|
||||
return;
|
||||
}
|
||||
conv = 1;
|
||||
server.dirty++; /* Force propagation on encoding change. */
|
||||
}
|
||||
addReply(c,conv ? shared.cone : shared.czero);
|
||||
} else {
|
||||
addReplyErrorFormat(c,"Unknown PFDEBUG subcommand '%s'", cmd);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user