Commit 3bc35f9c authored by antirez's avatar antirez
Browse files

Correctly replicate PFDEBUG GETREG.

Even if it is a debugging command, make sure that when it forces a
change in encoding, the command is propagated.
parent ba0afb45
...@@ -1306,10 +1306,13 @@ void pfdebugCommand(redisClient *c) { ...@@ -1306,10 +1306,13 @@ void pfdebugCommand(redisClient *c) {
if (!strcasecmp(cmd,"getreg")) { if (!strcasecmp(cmd,"getreg")) {
if (c->argc != 3) goto arityerr; if (c->argc != 3) goto arityerr;
if (hdr->encoding == HLL_SPARSE) {
if (hllSparseToDense(o) == REDIS_ERR) { if (hllSparseToDense(o) == REDIS_ERR) {
addReplyError(c,"HLL sparse encoding is corrupted"); addReplyError(c,"HLL sparse encoding is corrupted");
return; return;
} }
server.dirty++; /* Force propagation on encoding change. */
}
hdr = o->ptr; hdr = o->ptr;
addReplyMultiBulkLen(c,HLL_REGISTERS); addReplyMultiBulkLen(c,HLL_REGISTERS);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment