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
9d2b1f29
Commit
9d2b1f29
authored
Jun 11, 2018
by
zhaozhao.zz
Committed by
antirez
Jun 12, 2018
Browse files
Streams: lookupKey[Read->Write]OrReply in xdel and xtrim
parent
3d4ad250
Changes
1
Show whitespace changes
Inline
Side-by-side
src/t_stream.c
View file @
9d2b1f29
...
@@ -2056,7 +2056,7 @@ void xclaimCommand(client *c) {
...
@@ -2056,7 +2056,7 @@ void xclaimCommand(client *c) {
void
xdelCommand
(
client
*
c
)
{
void
xdelCommand
(
client
*
c
)
{
robj
*
o
;
robj
*
o
;
if
((
o
=
lookupKey
Read
OrReply
(
c
,
c
->
argv
[
1
],
shared
.
czero
))
==
NULL
if
((
o
=
lookupKey
Write
OrReply
(
c
,
c
->
argv
[
1
],
shared
.
czero
))
==
NULL
||
checkType
(
c
,
o
,
OBJ_STREAM
))
return
;
||
checkType
(
c
,
o
,
OBJ_STREAM
))
return
;
stream
*
s
=
o
->
ptr
;
stream
*
s
=
o
->
ptr
;
...
@@ -2097,7 +2097,7 @@ void xtrimCommand(client *c) {
...
@@ -2097,7 +2097,7 @@ void xtrimCommand(client *c) {
/* If the key does not exist, we are ok returning zero, that is, the
/* If the key does not exist, we are ok returning zero, that is, the
* number of elements removed from the stream. */
* number of elements removed from the stream. */
if
((
o
=
lookupKey
Read
OrReply
(
c
,
c
->
argv
[
1
],
shared
.
czero
))
==
NULL
if
((
o
=
lookupKey
Write
OrReply
(
c
,
c
->
argv
[
1
],
shared
.
czero
))
==
NULL
||
checkType
(
c
,
o
,
OBJ_STREAM
))
return
;
||
checkType
(
c
,
o
,
OBJ_STREAM
))
return
;
stream
*
s
=
o
->
ptr
;
stream
*
s
=
o
->
ptr
;
...
...
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