Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
525a7b39
Commit
525a7b39
authored
Jun 04, 2018
by
antirez
Browse files
XGROUP DESTROY implemented.
parent
ae9687de
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/t_stream.c
View file @
525a7b39
...
...
@@ -1542,7 +1542,6 @@ NULL
/* Certain subcommands require the group to exist. */
if
((
cg
=
streamLookupCG
(
s
,
grpname
))
==
NULL
&&
(
!
strcasecmp
(
opt
,
"SETID"
)
||
!
strcasecmp
(
opt
,
"DELGROUP"
)
||
!
strcasecmp
(
opt
,
"DELCONSUMER"
)))
{
addReplyErrorFormat
(
c
,
"-NOGROUP No such consumer group '%s' "
...
...
@@ -1569,7 +1568,14 @@ NULL
sdsnew
(
"-BUSYGROUP Consumer Group name already exists
\r\n
"
));
}
}
else
if
(
!
strcasecmp
(
opt
,
"SETID"
)
&&
c
->
argc
==
5
)
{
}
else
if
(
!
strcasecmp
(
opt
,
"DELGROUP"
)
&&
c
->
argc
==
4
)
{
}
else
if
(
!
strcasecmp
(
opt
,
"DESTROY"
)
&&
c
->
argc
==
4
)
{
if
(
cg
)
{
raxRemove
(
s
->
cgroups
,(
unsigned
char
*
)
grpname
,
sdslen
(
grpname
),
NULL
);
streamFreeCG
(
cg
);
addReply
(
c
,
shared
.
cone
);
}
else
{
addReply
(
c
,
shared
.
czero
);
}
}
else
if
(
!
strcasecmp
(
opt
,
"DELCONSUMER"
)
&&
c
->
argc
==
5
)
{
/* Delete the consumer and returns the number of pending messages
* that were yet associated with such a consumer. */
...
...
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