Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
0bbdaca6
Commit
0bbdaca6
authored
Apr 16, 2014
by
antirez
Browse files
PFDEBUG TODENSE added.
Converts HyperLogLogs from sparse to dense. Used for testing.
parent
402110f9
Changes
1
Show whitespace changes
Inline
Side-by-side
src/hyperloglog.c
View file @
0bbdaca6
...
@@ -1427,6 +1427,21 @@ void pfdebugCommand(redisClient *c) {
...
@@ -1427,6 +1427,21 @@ void pfdebugCommand(redisClient *c) {
if
(
c
->
argc
!=
3
)
goto
arityerr
;
if
(
c
->
argc
!=
3
)
goto
arityerr
;
addReplyStatus
(
c
,
encodingstr
[
hdr
->
encoding
]);
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
{
}
else
{
addReplyErrorFormat
(
c
,
"Unknown PFDEBUG subcommand '%s'"
,
cmd
);
addReplyErrorFormat
(
c
,
"Unknown PFDEBUG subcommand '%s'"
,
cmd
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment